diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index c7b35a49ad..5a02928710 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -998,7 +998,7 @@ final class WP_Screen { * Filter whether to show the Screen Options submit button. * * @since 4.4.0 - * + * * @param bool $show_button Whether to show Screen Options submit button. * Default false. * @param WP_Screen $this Current WP_Screen instance. @@ -1087,7 +1087,7 @@ final class WP_Screen { $id = "$column-hide"; echo '\n"; } ?> diff --git a/src/wp-admin/js/postbox.js b/src/wp-admin/js/postbox.js index a4cdad8001..9d7a938d8a 100644 --- a/src/wp-admin/js/postbox.js +++ b/src/wp-admin/js/postbox.js @@ -50,7 +50,7 @@ var postboxes; this.page = page; this.init( page, args ); - $handles.on( 'click.postboxes', this.handle_click ); + $handles.on( 'click.postboxes', this.handle_click ); $('.postbox .hndle a').click( function(e) { e.stopPropagation(); @@ -157,8 +157,15 @@ var postboxes; }, save_state : function(page) { - var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','), - hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(','); + var closed, hidden; + + // Return on the nav-menus.php screen, see #35112. + if ( 'nav-menus' === page ) { + return; + } + + closed = $( '.postbox' ).filter( '.closed' ).map( function() { return this.id; } ).get().join( ',' ); + hidden = $( '.postbox' ).filter( ':hidden' ).map( function() { return this.id; } ).get().join( ',' ); $.post(ajaxurl, { action: 'closed-postboxes',