WordPress at a glance
filter is not described

nav_menu_items_(post_type_name)_recent filter-hook . WP 4.3.0

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

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


add_filter( 'nav_menu_items_(post_type_name)_recent', 'filter_function_name_2306', 10, 4 );
function filter_function_name_2306( $most_recent, $args, $box, $recent_args ){
	// filter...

	return $most_recent;
An array of post objects being listed.
An array of WP_Query arguments for the meta box.
Arguments passed to wp_nav_menu_item_post_type_meta_box().
An array of WP_Query arguments for 'Most Recent' tab.

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

С версии 4.3.0 Введена.
С версии 4.9.0 Added the $recent_args parameter.

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

wp-admin/includes/nav-menu.php 556
$most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box, $recent_args );

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

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