Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



nav_menu_items_{$post_type_name} ›

Seit4.6.0
Veraltetn/v
apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type )
Parameter: (3)
  • (object[]) $posts The posts for the current post type. Mostly `WP_Post` objects, but can also contain "fake" post objects to represent other menu items.
    Erforderlich: Ja
  • (array) $args An array of `WP_Query` arguments.
    Erforderlich: Ja
  • (WP_Post_Type) $post_type The current post type object for this menu item meta box.
    Erforderlich: Ja
Siehe:
  • WP_Query::query()
Definiert in:
Codex:

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.





Quellcode

$posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type );