mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
parent
39abb6e2dc
commit
a289b607a3
1 changed files with 11 additions and 7 deletions
|
@ -71,17 +71,18 @@ class PluginName {
|
|||
// Add the options page and menu item.
|
||||
// add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
|
||||
|
||||
// Enqueue admin styles and scripts.
|
||||
// Load admin stylesheets and JavaScript.
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
||||
|
||||
// Enqueue public style and scripts.
|
||||
// Load public-facing stylesheets and JavaScript.
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
||||
|
||||
// Define custom functionality. See http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
|
||||
// Define custom functionality. Read more about actions and filters: http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
|
||||
add_action( 'TODO', array( $this, 'action_method_name' ) );
|
||||
add_filter( 'TODO', array( $this, 'filter_method_name' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -136,7 +137,7 @@ class PluginName {
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueue admin-specific style sheets.
|
||||
* Register and enqueue admin-specific stylesheets.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
|
@ -156,7 +157,7 @@ class PluginName {
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueue admin-specific JavaScript.
|
||||
* Register and enqueue admin-specific JavaScript.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
|
@ -176,7 +177,7 @@ class PluginName {
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueue public-facing style sheets.
|
||||
* Register and enqueue public-facing stylesheets.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
@ -185,7 +186,7 @@ class PluginName {
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueues public-facing script files.
|
||||
* Register and enqueues public-facing JavaScript files.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
@ -199,6 +200,7 @@ class PluginName {
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public function add_plugin_admin_menu() {
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
*
|
||||
|
@ -213,6 +215,7 @@ class PluginName {
|
|||
$this->plugin_slug,
|
||||
array( $this, 'display_plugin_admin_page' )
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -249,4 +252,5 @@ class PluginName {
|
|||
public function filter_method_name() {
|
||||
// TODO: Define your filter hook callback here
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue