mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
updating the calls to the plugin loader so that they appropriately call add_action and add_filter
This commit is contained in:
parent
d5bb1de8fb
commit
71f40d5e7a
1 changed files with 5 additions and 5 deletions
|
@ -64,23 +64,23 @@ $loader = new Plugin_Name_Loader();
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-i18n.php';
|
require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-i18n.php';
|
||||||
$plugin_i18n = new Plugin_Name_i18n();
|
$plugin_i18n = new Plugin_Name_i18n();
|
||||||
$loader->add( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
|
$loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( __FILE__ ) . 'admin/class-plugin-name-admin.php';
|
require_once plugin_dir_path( __FILE__ ) . 'admin/class-plugin-name-admin.php';
|
||||||
$plugin_name_admin = new Plugin_Name_Admin();
|
$plugin_name_admin = new Plugin_Name_Admin();
|
||||||
$loader->add( 'admin_enqueue_scripts', $plugin_name_admin, 'enqueue_styles' );
|
$loader->add_action( 'admin_enqueue_scripts', $plugin_name_admin, 'enqueue_styles' );
|
||||||
$loader->add( 'admin_enqueue_scripts', $plugin_name_admin, 'enqueue_scripts' );
|
$loader->add_action( 'admin_enqueue_scripts', $plugin_name_admin, 'enqueue_scripts' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
require_once plugin_dir_path( __FILE__ ) . 'public/class-plugin-name-public.php';
|
require_once plugin_dir_path( __FILE__ ) . 'public/class-plugin-name-public.php';
|
||||||
$plugin_name_public = new Plugin_Name_Public();
|
$plugin_name_public = new Plugin_Name_Public();
|
||||||
$loader->add( 'wp_enqueue_scripts', $plugin_name_public, 'enqueue_styles' );
|
$loader->add_action( 'wp_enqueue_scripts', $plugin_name_public, 'enqueue_styles' );
|
||||||
$loader->add( 'wp_enqueue_scripts', $plugin_name_public, 'enqueue_scripts' );
|
$loader->add_action( 'wp_enqueue_scripts', $plugin_name_public, 'enqueue_scripts' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
|
|
Loading…
Reference in a new issue