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.

Fixes #35112 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@36137 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2015-12-31 11:51:09 +00:00
parent 7ce16f660e
commit 93e3093a0a
2 changed files with 12 additions and 5 deletions

View File

@ -1087,7 +1087,7 @@ final class WP_Screen {
$id = "$column-hide";
echo '<label>';
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
echo "$title</label>\n";
}
?>

View File

@ -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',