Returns the value of a menu’s auto_add setting.
Parameters
$menu_id
intrequired- The menu id to query.
Source
protected function get_menu_auto_add( $menu_id ) {
$nav_menu_option = (array) get_option( 'nav_menu_options', array( 'auto_add' => array() ) );
return in_array( $menu_id, $nav_menu_option['auto_add'], true );
}
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.