Make WordPress Core

Ticket #19350: 19350.patch

File 19350.patch, 2.0 KB (added by SergeyBiryukov, 13 years ago)
  • wp-admin/widgets.php

     
    9494
    9595        if ( !isset( $wp_registered_sidebars[ $sidebar_id ] ) ) {
    9696                if ( ! empty( $widgets ) ) { // register the inactive_widgets area as sidebar
    97                         register_sidebar(array(
    98                                 'name' => __( 'Inactive Sidebar (from previous theme)' ),
     97                        register_sidebar( array(
     98                                'name' => __( 'Inactive Sidebar (not used)' ),
    9999                                'id' => $sidebar_id,
    100100                                'class' => 'inactive-sidebar orphan-sidebar',
    101                                 'description' => __( 'This is a left over sidebar from an old theme and does not show anywhere on your site' ),
     101                                'description' => __( 'This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.' ),
    102102                                'before_widget' => '',
    103103                                'after_widget' => '',
    104104                                'before_title' => '',
    105105                                'after_title' => '',
    106                         ));
     106                        ) );
    107107                } else {
    108108                        unset( $sidebars_widgets[ $sidebar_id ] );
    109109                }
     
    344344
    345345<?php
    346346foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
    347         if ( 'wp_inactive_widgets' == $sidebar || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) {
     347        if ( 'wp_inactive_widgets' == $sidebar || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) || false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) ) {
    348348                $wrap_class = 'widgets-holder-wrap';
    349349                if ( !empty( $registered_sidebar['class'] ) )
    350350                        $wrap_class .= ' ' . $registered_sidebar['class'];
     
    376376<?php
    377377$i = 0;
    378378foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
    379         if ( 'wp_inactive_widgets' == $sidebar || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) )
     379        if ( 'wp_inactive_widgets' == $sidebar || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) || false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) )
    380380                continue;
    381381
    382382        $wrap_class = 'widgets-holder-wrap';