WordPress.org

Make WordPress Core

Changeset 36522


Ignore:
Timestamp:
02/12/2016 11:51:16 PM (5 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-widgets.js

    r36414 r36522  
    18301830            });
    18311831
    1832             if ( ! widgetControls.length ) {
     1832            if ( 0 === widgetControls.length || ( 1 === api.Widgets.registeredSidebars.length && widgetControls.length <= 1 ) ) {
    18331833                this.container.find( '.reorder-toggle' ).hide();
    18341834                return;
Note: See TracChangeset for help on using the changeset viewer.