[wp-trac] [WordPress Trac] #29743: warning with join in nav-menu-template.php (L 98) when apply_filters nav_menu_css_class return null
WordPress Trac
noreply at wordpress.org
Mon Oct 27 02:08:15 UTC 2014
#29743: warning with join in nav-menu-template.php (L 98) when apply_filters
nav_menu_css_class return null
-------------------------+--------------------------
Reporter: eadoking | Owner: markjaquith
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.1
Component: Menus | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+--------------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
> there is a warning because apply_filters on nav_menu_css_class return
null
I think this should be considered a developer error. If the goal is to
remove the classes, `__return_empty_array()` should be used here instead
of `__return_null`.
But if we're going to keep [30032], we should do the same for
`body_class`, `post_class`, `comment_class`, and `page_css_class` filters
as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29743#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list