Customizer: Prevent loss of walker and fallback_cb args for wp_nav_menu.

These args only need to be cleared out when exported to JavaScript, when they are not JSON-serializable. So the filter now clears these when gathering args for exporting to JS, but otherwise now leaves the original values to be passed through to `wp_nav_menu()`.

Fixes #32781.

Built from https://develop.svn.wordpress.org/trunk@33131


git-svn-id: http://core.svn.wordpress.org/trunk@33102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2015-07-08 20:18:27 +00:00
parent 28c1600e6e
commit 9e26f1db4c
2 changed files with 8 additions and 6 deletions

View File

@ -771,15 +771,17 @@ final class WP_Customize_Nav_Menus {
);
$args['can_partial_refresh'] = $can_partial_refresh;
$hashed_args = $args;
if ( ! $can_partial_refresh ) {
$args['fallback_cb'] = '';
$args['walker'] = '';
$hashed_args['fallback_cb'] = '';
$hashed_args['walker'] = '';
}
ksort( $args );
$args['args_hash'] = $this->hash_nav_menu_args( $args );
ksort( $hashed_args );
$hashed_args['args_hash'] = $this->hash_nav_menu_args( $hashed_args );
$this->preview_nav_menu_instance_args[ $this->preview_nav_menu_instance_number ] = $args;
$this->preview_nav_menu_instance_args[ $this->preview_nav_menu_instance_number ] = $hashed_args;
return $args;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta1-33130';
$wp_version = '4.3-beta1-33131';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.