Dashboard: Introduce the `dashboard_recent_drafts_query_args` filter, making it possible to manipulate the post query arguments used in the 'Recent Drafts' dashboard widget.

Props iamfriendly.
Fixes #8243.

Built from https://develop.svn.wordpress.org/trunk@35003


git-svn-id: http://core.svn.wordpress.org/trunk@34968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-10-10 06:33:25 +00:00
parent 69c828b77b
commit 504ff07656
2 changed files with 11 additions and 1 deletions

View File

@ -522,6 +522,16 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
'orderby' => 'modified',
'order' => 'DESC'
);
/**
* Filter the post query arguments for the 'Recent Drafts' dashboard widget.
*
* @since 4.4.0
*
* @param array $query_args The query arguments for the recent drafts dashboard widget.
*/
$query_args = apply_filters( 'dashboard_recent_drafts_query_args', $query_args );
$drafts = get_posts( $query_args );
if ( ! $drafts ) {
return;

View File

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