From 8eb25609e914b56fc8fa1a3a359a804ee7a6d212 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 22 Feb 2015 19:57:24 +0000 Subject: [PATCH] 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 --- wp-admin/includes/dashboard.php | 9 +++++++++ wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 0cedf72dbd..62f3f70ca2 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -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() ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 6bc609c7ed..fbbfd7e024 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.