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

props danielbachhuber.
fixes #29374.
Built from https://develop.svn.wordpress.org/trunk@31508


git-svn-id: http://core.svn.wordpress.org/trunk@31489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-02-22 19:57:24 +00:00
parent 93e5bb3702
commit 8eb25609e9
2 changed files with 10 additions and 1 deletions

View File

@ -689,6 +689,15 @@ function wp_dashboard_recent_posts( $args ) {
'cache_results' => false,
'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
);
/**
* Filter the query arguments used for the Recent Posts widget.
*
* @since 4.2.0
*
* @param array $query_args The arguments passed to WP_Query to produce the list of posts.
*/
$query_args = apply_filters( 'dashboard_recent_posts_query_args', $query_args );
$posts = new WP_Query( $query_args );
if ( $posts->have_posts() ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31507';
$wp_version = '4.2-alpha-31508';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.