Make WordPress Core

Changeset 35003


Ignore:
Timestamp:
10/10/2015 06:32:51 AM (9 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r34980 r35003  
    523523            'order'          => 'DESC'
    524524        );
     525
     526        /**
     527         * Filter the post query arguments for the 'Recent Drafts' dashboard widget.
     528         *
     529         * @since 4.4.0
     530         *
     531         * @param array $query_args The query arguments for the recent drafts dashboard widget.
     532         */
     533        $query_args = apply_filters( 'dashboard_recent_drafts_query_args', $query_args );
     534
    525535        $drafts = get_posts( $query_args );
    526536        if ( ! $drafts ) {
Note: See TracChangeset for help on using the changeset viewer.