[wp-trac] [WordPress Trac] #43113: Multiple custom item classes are returned as single string when using 'nav_menu_link_attributes' filter with Customizer preview
WordPress Trac
noreply at wordpress.org
Wed Nov 11 14:49:26 UTC 2020
#43113: Multiple custom item classes are returned as single string when using
'nav_menu_link_attributes' filter with Customizer preview
---------------------------------------------+-----------------------------
Reporter: lrdn | Owner: noisysocks
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Customize | Version: 4.3
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+-----------------------------
Comment (by dlh):
Thanks for testing and for refreshing the patch, @noisysocks!
Re. `is_string()`: Fair enough, although protection against warnings (PHP
< 8) or fatal errors (PHP 8) will be lost on the (just-as-silly) chance
that `$classes` is another non-scalar type. Switching from `! is_array()`
to `is_scalar()` might be the way to go to handle both cases.
That nitpick aside, this looks good to me too!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43113#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list