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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36522 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2016-02-12 23:51:16 +00:00
parent 0b761497c5
commit b5a54ae692

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 {