WordPress at a glance
filter is not described

nav_menu_items_(post_type_name) filter-hook . WP 3.2.0

Filters the posts displayed in the 'View All' tab of the current post type's menu items meta box.

The dynamic portion of the hook name, $post_type_name, refers to the slug of the current post type.


add_filter( 'nav_menu_items_(post_type_name)', 'filter_function_name_1976', 10, 3 );
function filter_function_name_1976( $posts, $args, $post_type ){
	// filter...

	return $posts;
The posts for the current post type. Mostly WP_Post objects, but can also contain "fake" post objects to represent other menu items.
An array of WP_Query arguments.
The current post type object for this menu item meta box.

Список изменений

С версии 3.2.0 Введена.
С версии 4.6.0 Converted the $post_type parameter to accept a WP_Post_Type object.

Где вызывается хук

wp-admin/includes/nav-menu.php 646
$posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type );

Где используется хук в ядре WordPress

Использование не найдено.