Make WordPress Core


Ignore:
Timestamp:
02/22/2015 07:56:09 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Dashboard: Add a filter for the query arguments used for the Recent Posts widget.

props danielbachhuber.
fixes #29374.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r31200 r31508  
    690690        'perm'           => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
    691691    );
     692
     693    /**
     694     * Filter the query arguments used for the Recent Posts widget.
     695     *
     696     * @since 4.2.0
     697     *
     698     * @param array $query_args The arguments passed to WP_Query to produce the list of posts.
     699     */
     700    $query_args = apply_filters( 'dashboard_recent_posts_query_args', $query_args );
    692701    $posts = new WP_Query( $query_args );
    693702
Note: See TracChangeset for help on using the changeset viewer.