wp_get_associated_nav_menu_items


wp_get_associated_nav_menu_items ( $object_id = 0, $object_type = 'post_type', $taxonomy = '' )

Parameters:
  • (int) object_id Optional. The ID of the original object. Default 0.
  • (string) object_type Optional. The type of object, such as 'post_type' or 'taxonomy'. Default 'post_type'.
  • (string) taxonomy Optional. If $object_type is 'taxonomy', $taxonomy is the name of the tax that $object_id belongs to. Default empty.
Returns:
  • (int[]) The array of menu item IDs; empty array if none.
Defined at:

Description

Returns the menu items associated with a particular object.

Related Functions

wp_get_nav_menu_items, wp_save_nav_menu_items, _sort_nav_menu_items, wp_update_nav_menu_item, wp_setup_nav_menu_item

Top Google Results

User discussions

wpseek mobile