Make WordPress Core

Changeset 49238


Ignore:
Timestamp:
10/20/2020 04:38:32 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Quick/Bulk Edit: Introduce quick_edit_dropdown_authors_args filter.

This allows for customizing the arguments used to generate the Quick Edit authors drop-down.

Additionally, pass the $bulk argument to the quick_edit_dropdown_pages_args filter, for consistency.

Props Mista-Flo, garrett-eclipse, hellofromTonya.
Fixes #47685.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r49193 r49238  
    15881588                        }
    15891589
     1590                        /**
     1591                         * Filters the arguments used to generate the Quick Edit authors drop-down.
     1592                         *
     1593                         * @since 5.6.0
     1594                         *
     1595                         * @see wp_dropdown_users()
     1596                         *
     1597                         * @param array $users_opt An array of arguments passed to wp_dropdown_users().
     1598                         * @param bool  $bulk      A flag to denote if it's a bulk action.
     1599                         */
     1600                        $users_opt = apply_filters( 'quick_edit_dropdown_authors_args', $users_opt, $bulk );
     1601
    15901602                        $authors = wp_dropdown_users( $users_opt );
    15911603                        if ( $authors ) :
     
    16831695                             *
    16841696                             * @since 2.7.0
     1697                             * @since 5.6.0 The `$bulk` parameter was added.
    16851698                             *
    16861699                             * @see wp_dropdown_pages()
    16871700                             *
    1688                              * @param array $dropdown_args An array of arguments.
     1701                             * @param array $dropdown_args An array of arguments passed to wp_dropdown_pages().
     1702                             * @param bool  $bulk          A flag to denote if it's a bulk action.
    16891703                             */
    1690                             $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
     1704                            $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args, $bulk );
    16911705
    16921706                            wp_dropdown_pages( $dropdown_args );
Note: See TracChangeset for help on using the changeset viewer.