Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: nav_menu_items_{$post_type_name}_recent

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
416                      *
417                      * The dynamic portion of the hook name, `$post_type_name`, refers to the post type name.
418                      *
419                      * @since 4.3.0
420                      *
421                      * @param array $most_recent An array of post objects being listed.
422                      * @param array $args        An array of WP_Query arguments.
423                      * @param array $box         Arguments passed to wp_nav_menu_item_post_type_meta_box().
424                      */
425                     $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box );
426
427                     echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );
428                     ?>
429                </ul>
430           </div><!-- /.tabs-panel -->
431
432           <div class="tabs-panel <?php
433                echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
434           ?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">