A WordPress-centric search engine for devs and theme authors



nav_menu_items_{$post_type_name}_recent ›

Since4.9.0
Deprecatedn/a
apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box, $recent_args )
Parameters: (4)
  • (WP_Post[]) $most_recent An array of post objects being listed.
    Required: Yes
  • (array) $args An array of `WP_Query` arguments for the meta box.
    Required: Yes
  • (array) $box Arguments passed to `wp_nav_menu_item_post_type_meta_box()`.
    Required: Yes
  • (array) $recent_args An array of `WP_Query` arguments for 'Most Recent' tab.
    Required: Yes
Defined at:
Codex:

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.





Source

$most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box, $recent_args );