WordPress.org

Make WordPress Core

Changeset 36145


Ignore:
Timestamp:
01/02/2016 03:33:15 AM (5 years ago)
Author:
dd32
Message:

Admin: Restore the "Show advanced menu properties" checkboxes IDs.
These checkboxes are used on the Menus screen options and the Customizer Menus options.
Their IDs were removed in [34991] but they're needed to get the checkboxes to be saved
via AJAX. Also, avoids a useless AJAX call.

Merge [36137] to the 4.4 branch.
Props afercia.
Fixes #35112.

Location:
branches/4.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-admin/includes/class-wp-screen.php

    r36104 r36145  
    999999         *
    10001000         * @since 4.4.0
    1001          * 
     1001         *
    10021002         * @param bool      $show_button Whether to show Screen Options submit button.
    10031003         *                               Default false.
     
    10881088            $id = "$column-hide";
    10891089            echo '<label>';
    1090             echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
     1090            echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
    10911091            echo "$title</label>\n";
    10921092        }
  • branches/4.4/src/wp-admin/js/postbox.js

    r34977 r36145  
    5151            this.init( page, args );
    5252
    53             $handles.on( 'click.postboxes',  this.handle_click );
     53            $handles.on( 'click.postboxes', this.handle_click );
    5454
    5555            $('.postbox .hndle a').click( function(e) {
     
    145145
    146146        save_state : function(page) {
    147             var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','),
    148                 hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(',');
     147            var closed, hidden;
     148
     149            // Return on the nav-menus.php screen, see #35112.
     150            if ( 'nav-menus' === page ) {
     151                return;
     152            }
     153
     154            closed = $( '.postbox' ).filter( '.closed' ).map( function() { return this.id; } ).get().join( ',' );
     155            hidden = $( '.postbox' ).filter( ':hidden' ).map( function() { return this.id; } ).get().join( ',' );
    149156
    150157            $.post(ajaxurl, {
Note: See TracChangeset for help on using the changeset viewer.