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:
Nick Croft
2014-06-20 09:59:55 -04:00
parent ff6077078d
commit 5300ec9601
2 changed files with 5 additions and 13 deletions
+2 -12
View File
@@ -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
View File
@@ -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' );