Customize: Ensure that `wp_setup_nav_menu_item` filter applies consistently on `nav_menu_item` setting values.

The filter was being applied in `WP_Customize_Nav_Menu_Item_Setting::value()` but not in `WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item()`.

Props celloexpressions, westonruter.
Fixes #35203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-05-10 06:41:29 +00:00
parent 096d0ccd63
commit 574be8f2a8
2 changed files with 4 additions and 1 deletions

View File

@ -570,6 +570,9 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
/** This filter is documented in wp-includes/nav-menu.php */ /** This filter is documented in wp-includes/nav-menu.php */
$post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) ); $post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) );
/** This filter is documented in wp-includes/nav-menu.php */
$post = apply_filters( 'wp_setup_nav_menu_item', $post );
return $post; return $post;
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-alpha-37404'; $wp_version = '4.6-alpha-37405';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.