mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-07-11 10:36:03 +09:00
Updated to simplify admin load
added a class exist check before requiring the admin.php file to ensure that the class will exist and removed the genesis_admin_menu hook to simplify issues when working with the global admin class object.
This commit is contained in:
+2
-12
@@ -336,16 +336,6 @@ class Genesis_Simple_Sidebars_Admin extends Genesis_Admin_Basic {
|
||||
|
||||
}
|
||||
|
||||
add_action( 'genesis_admin_menu', 'simplesidebars_settings_menu' );
|
||||
/**
|
||||
* Instantiate the class to create the menu.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function simplesidebars_settings_menu() {
|
||||
global $_genesis_simple_sidebars_admin;
|
||||
|
||||
global $_genesis_simple_sidebars_admin;
|
||||
|
||||
$_genesis_simple_sidebars_admin = new Genesis_Simple_Sidebars_Admin;
|
||||
|
||||
}
|
||||
$_genesis_simple_sidebars_admin = new Genesis_Simple_Sidebars_Admin;
|
||||
|
||||
+3
-1
@@ -75,7 +75,9 @@ function ss_genesis_init() {
|
||||
return;
|
||||
|
||||
//* Include admin files
|
||||
require_once( SS_PLUGIN_DIR . '/includes/admin.php' );
|
||||
if( class_exists( 'Genesis_Admin_Boxes' ) ) {
|
||||
require_once( SS_PLUGIN_DIR . '/includes/admin.php' );
|
||||
}
|
||||
require_once( SS_PLUGIN_DIR . '/includes/inpost.php' );
|
||||
require_once( SS_PLUGIN_DIR . '/includes/term.php' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user