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:
parent
69c828b77b
commit
504ff07656
|
@ -522,6 +522,16 @@ function wp_dashboard_recent_drafts( $drafts = false ) {
|
||||||
'orderby' => 'modified',
|
'orderby' => 'modified',
|
||||||
'order' => 'DESC'
|
'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 );
|
$drafts = get_posts( $query_args );
|
||||||
if ( ! $drafts ) {
|
if ( ! $drafts ) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue