nav_menu_items_{$post_type_name}

nav_menu_items_{$post_type_name}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.2.2

apply_filters('nav_menu_items_{$post_type_name}') is found 1 times:

  • /wp-admin/includes/nav-menu.php line 661
    				 *                                can also contain "fake" post objects to represent other menu items.
    				 * @param array        $args      An array of `WP_Query` arguments.
    				 * @param WP_Post_Type $post_type The current post type object for this menu item meta box.
    				 */
    				$posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type );
    
    				$checkbox_items = walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $posts ), 0, (object) $args );
    
    				echo $checkbox_items;
    				?>
    			</ul>