Make WordPress Core


Ignore:
Timestamp:
09/12/2012 02:16:46 AM (12 years ago)
Author:
nacin
Message:

Don't show Appearance > Widgets if the theme has no sidebars defined. props SergeyBiryukov for the initial patch. fixes #21761.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r21823 r21825  
    25502550function wp_widgets_add_menu() {
    25512551    global $submenu;
     2552
     2553    if ( ! current_theme_supports( 'widgets' ) )
     2554        return;
     2555
    25522556    $submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_theme_options', 'widgets.php' );
    25532557    ksort( $submenu['themes.php'], SORT_NUMERIC );
Note: See TracChangeset for help on using the changeset viewer.