WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 459 | * |
| 460 | * @since 4.3.0 |
| 461 | * @since 4.9.0 Added the `$recent_args` parameter. |
| 462 | * |
| 463 | * @param WP_Post[] $most_recent An array of post objects being listed. |
| 464 | * @param array $args An array of `WP_Query` arguments for the meta box. |
| 465 | * @param array $box Arguments passed to `wp_nav_menu_item_post_type_meta_box()`. |
| 466 | * @param array $recent_args An array of `WP_Query` arguments for 'Most Recent' tab. |
| 467 | */ |
| 468 | $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box, $recent_args ); |
| 469 | |
| 470 | echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $most_recent ), 0, (object) $args ); |
| 471 | ?> |
| 472 | </ul> |
| 473 | </div><!-- /.tabs-panel --> |
| 474 | |
| 475 | <div class="tabs-panel <?php echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); ?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search"> |
| 476 | <?php |
| 477 | if ( isset( $_REQUEST[ 'quick-search-posttype-' . $post_type_name ] ) ) { |