mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Don't show Appearance > Widgets if the theme has no sidebars defined. props SergeyBiryukov for the initial patch. fixes #21761.
git-svn-id: https://develop.svn.wordpress.org/trunk@21825 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2549,6 +2549,10 @@ function wp_maybe_load_widgets() {
|
||||
*/
|
||||
function wp_widgets_add_menu() {
|
||||
global $submenu;
|
||||
|
||||
if ( ! current_theme_supports( 'widgets' ) )
|
||||
return;
|
||||
|
||||
$submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_theme_options', 'widgets.php' );
|
||||
ksort( $submenu['themes.php'], SORT_NUMERIC );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user