Widgets: Show the "Clear Inactive Widgets" button only after the sidebar with inactive widgets.

Fixes #35447.
Built from https://develop.svn.wordpress.org/trunk@36368


git-svn-id: http://core.svn.wordpress.org/trunk@36335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-01-20 21:54:26 +00:00
parent 42caba7134
commit 23133b0b06
2 changed files with 7 additions and 1 deletions

View File

@ -406,10 +406,13 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
if ( !empty( $registered_sidebar['class'] ) )
$wrap_class .= ' ' . $registered_sidebar['class'];
$is_inactive_widgets = 'wp_inactive_widgets' == $registered_sidebar['id'];
?>
<div class="<?php echo esc_attr( $wrap_class ); ?>">
<div class="widget-holder inactive">
<?php wp_list_widget_controls( $registered_sidebar['id'], $registered_sidebar['name'] ); ?>
<?php if ( $is_inactive_widgets ) { ?>
<div class="remove-inactive-widgets">
<form action="" method="post">
<p>
@ -427,8 +430,11 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
<?php wp_nonce_field( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); ?>
</form>
</div>
<?php } ?>
</div>
<?php if ( $is_inactive_widgets ) { ?>
<p class="description"><?php _e( 'This will clear all items from the inactive widgets list. You will not be able to restore any customizations.' ); ?></p>
<?php } ?>
</div>
<?php

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36367';
$wp_version = '4.5-alpha-36368';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.