Load order fixed.
git-svn-id: https://develop.svn.wordpress.org/trunk@5377 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e6ab5d6f99
commit
c30d0f3c57
|
@ -1506,11 +1506,13 @@ function wp_parse_args( $args, $defaults = '' ) {
|
|||
function wp_maybe_load_widgets() {
|
||||
if ( !function_exists( 'dynamic_sidebar' ) ) {
|
||||
require_once ABSPATH . WPINC . '/widgets.php';
|
||||
|
||||
if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) !== false && isset( $GLOBALS['submenu'] ) ) {
|
||||
$GLOBALS['submenu']['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' );
|
||||
}
|
||||
add_action( 'admin_head', 'wp_widgets_admin_page' );
|
||||
}
|
||||
}
|
||||
|
||||
function wp_widgets_admin_page() {
|
||||
global $submenu;
|
||||
$submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_themes', 'widgets.php' );
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue