mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
Don't show Widgets admin page if core widgets aren't enabled. fixes #4218
git-svn-id: https://develop.svn.wordpress.org/trunk@5376 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1506,6 +1506,10 @@ 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' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user