Returns the classic menu with the slug primary
if it exists.
Parameters
$classic_nav_menus
WP_Term[]required- Array of classic nav menu term objects.
Source
private static function get_nav_menu_with_primary_slug( $classic_nav_menus ) {
foreach ( $classic_nav_menus as $classic_nav_menu ) {
if ( 'primary' === $classic_nav_menu->slug ) {
return $classic_nav_menu;
}
}
return null;
}
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.