[wp-trac] [WordPress Trac] #23627: Allow plugins to short-circuit wp_nav_menu, good for performance
WordPress Trac
noreply at wordpress.org
Wed Feb 5 18:51:58 UTC 2014
#23627: Allow plugins to short-circuit wp_nav_menu, good for performance
-------------------------+-----------------------
Reporter: kasparsd | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.9
Component: Menus | Version: 3.5.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
-------------------------+-----------------------
Comment (by Rarst):
Nitpicking on patch - why check for null twice? Also yoda condition.
{{{
if ( null !== $nav_menu ) {
if ( $args->echo ) {
echo $nav_menu;
return;
}
return $nav_menu;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23627#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list