Make WordPress Core

Ticket #35112: 35112.2.patch

File 35112.2.patch, 3.0 KB (added by Asgaros, 10 years ago)
  • src/wp-admin/includes/class-wp-screen.php

     
    998998                 * Filter whether to show the Screen Options submit button.
    999999                 *
    10001000                 * @since 4.4.0
    1001                  * 
     1001                 *
    10021002                 * @param bool      $show_button Whether to show Screen Options submit button.
    10031003                 *                               Default false.
    10041004                 * @param WP_Screen $this        Current WP_Screen instance.
     
    10871087
    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                }
    10931093                ?>
  • src/wp-admin/js/customize-nav-menus.js

     
    216216                                        .prop( 'tabIndex', -1 )
    217217                                        .removeClass( 'is-visible' );
    218218                        }
    219                        
     219
    220220                        this.searchTerm = event.target.value;
    221221                        this.pages.search = 1;
    222222                        this.doSearch( 1 );
     
    631631                },
    632632
    633633                hidden: function() {
    634                         this.hidden = function() {
    635                                 return $( '.hide-column-tog' ).not( ':checked' ).map( function() {
    636                                         var id = this.id;
    637                                         return id.substring( id, id.length - 5 );
    638                                 }).get().join( ',' );
    639                         };
     634                        return $( '.hide-column-tog' ).not( ':checked' ).map( function() {
     635                                var id = this.id;
     636                                return id.substring( id, id.length - 5 );
     637                        }).get().join( ',' );
    640638                }
    641639        } );
    642640
  • src/wp-admin/js/postbox.js

     
    5050                        this.page = page;
    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) {
    5656                                e.stopPropagation();
     
    157157                },
    158158
    159159                save_state : function(page) {
    160                         var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','),
    161                                 hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(',');
     160                        var closed, hidden;
    162161
     162                        // Return on the nav-menus.php screen, see #35112.
     163                        if ( 'nav-menus' === page ) {
     164                                return;
     165                        }
     166
     167                        closed = $( '.postbox' ).filter( '.closed' ).map( function() { return this.id; } ).get().join( ',' );
     168                        hidden = $( '.postbox' ).filter( ':hidden' ).map( function() { return this.id; } ).get().join( ',' );
     169
    163170                        $.post(ajaxurl, {
    164171                                action: 'closed-postboxes',
    165172                                closed: closed,