mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@35003 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
48ceecafc7
commit
a521a4e7f6
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user