mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
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:
parent
93e5bb3702
commit
8eb25609e9
|
|
@ -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() ) {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user