WordPress.org

Make WordPress Core

Ticket #21761: no-widget-menu.diff

File no-widget-menu.diff, 512 bytes (added by greenshady, 3 years ago)

Load widgets but no admin menu

  • wp-includes/functions.php

     
    25282528        if ( ! apply_filters('load_default_widgets', true) ) 
    25292529                return; 
    25302530        require_once( ABSPATH . WPINC . '/default-widgets.php' ); 
    2531         add_action( '_admin_menu', 'wp_widgets_add_menu' ); 
     2531 
     2532        if ( current_theme_supports( 'widgets' ) ) 
     2533                add_action( '_admin_menu', 'wp_widgets_add_menu' ); 
    25322534} 
    25332535 
    25342536/**