WordPress.org

Make WordPress Core

Ticket #19365: 19365.diff

File 19365.diff, 598 bytes (added by jpyper, 7 years ago)

Add one line with an apply_filters for altering posts passed into the Most Recent tab, just like is already done for the View All tab.

  • /Users/jarrodpyper/Downloads/wordpress/wp-admin/includes/

    old new  
    674674                                $recent_args = array_merge( $args, array( 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => 15 ) );
    675675                                $most_recent = $get_posts->query( $recent_args );
    676676                                $args['walker'] = $walker;
     677                                $most_recent = apply_filters('nav_menu_items_'.$post_type_name.'_recent', $most_recent);
    677678                                echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );
    678679                                ?>
    679680                        </ul>