Ticket #19350: 19350.patch
File 19350.patch, 2.0 KB (added by , 13 years ago) |
---|
-
wp-admin/widgets.php
94 94 95 95 if ( !isset( $wp_registered_sidebars[ $sidebar_id ] ) ) { 96 96 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)' ), 99 99 'id' => $sidebar_id, 100 100 '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.' ), 102 102 'before_widget' => '', 103 103 'after_widget' => '', 104 104 'before_title' => '', 105 105 'after_title' => '', 106 ) );106 ) ); 107 107 } else { 108 108 unset( $sidebars_widgets[ $sidebar_id ] ); 109 109 } … … 344 344 345 345 <?php 346 346 foreach ( $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' ) ) { 348 348 $wrap_class = 'widgets-holder-wrap'; 349 349 if ( !empty( $registered_sidebar['class'] ) ) 350 350 $wrap_class .= ' ' . $registered_sidebar['class']; … … 376 376 <?php 377 377 $i = 0; 378 378 foreach ( $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' ) ) 380 380 continue; 381 381 382 382 $wrap_class = 'widgets-holder-wrap';