[wp-trac] [WordPress Trac] #35328: In Customizer the Nav Menu Item saves to fail to return the expected response
WordPress Trac
noreply at wordpress.org
Wed Jan 6 17:52:36 UTC 2016
#35328: In Customizer the Nav Menu Item saves to fail to return the expected
response
-------------------------------+------------------------------
Reporter: sarahpressler | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 4.4
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by westonruter):
* keywords: => reporter-feedback
Comment:
I can't reproduce the issue on in install without any plugins active.
However, I was able to reproduce this issue on a site that had the
Customize Posts plugin installed. The plugin had an old shim that
implemented the `customize_save_response` filter (with a different name)
before it was added to Core in 4.2, and it caused menus in the Customizer
to fail to communicate back the IDs for inserted nav menus, resulting in
the behavior described in this ticket. Fixed issue with that plugin in
https://github.com/xwp/wp-customize-
posts/commit/2ef19532f8c5800bcd6ebf771e7336d0dc296e0e
Likewise, if a plugin erroneously overrides the `customize_save_response`
with a filter like:
{{{#!php
<?php
add_filter( 'customize_save_response', function() {
return array( 'foo' => 'bar' );
} );
}}}
Then this same behavior would be experienced. Instead plugins should
extend the existing `$response` array like:
{{{#!php
<?php
add_filter( 'customize_save_response', function( $response ) {
return array_merge( $response, array( 'foo' => 'bar' ) );
} );
}}}
Please send me a ZIP of the plugins activated on the site so that I can
test.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35328#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list