Customize: Hide widgets re-order button when no re-ordering is possible.

Hide the re-order button if there are no widgets in the sidebar, or if there is there is only one sidebar and there is only one widget in the sidebar.

Props rabmalin, westonruter.
Fixes #35533.

Built from https://develop.svn.wordpress.org/trunk@36522


git-svn-id: http://core.svn.wordpress.org/trunk@36489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-02-12 23:52:27 +00:00
parent f99ec3db18
commit 453ff22d7f
3 changed files with 3 additions and 3 deletions

View File

@ -1829,7 +1829,7 @@
}
});
if ( ! widgetControls.length ) {
if ( 0 === widgetControls.length || ( 1 === api.Widgets.registeredSidebars.length && widgetControls.length <= 1 ) ) {
this.container.find( '.reorder-toggle' ).hide();
return;
} else {

File diff suppressed because one or more lines are too long

View File

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