WordPress.org

Make WordPress Core

Changeset 47472


Ignore:
Timestamp:
03/18/2020 07:11:33 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Post Formats: Pass post type to the disable_formats_dropdown filter in WP_Posts_List_Table::formats_dropdown().

Props MatheusFD, birgire.
Fixes #47959.

File:
1 edited

Legend:

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

    r47304 r47472  
    470470     * @access protected
    471471     *
    472      * @param string $post_type Post type key.
     472     * @param string $post_type Post type slug.
    473473     */
    474474    protected function formats_dropdown( $post_type ) {
     
    477477         *
    478478         * @since 5.2.0
     479         * @since 5.5.0 The `$post_type` parameter was added.
    479480         *
    480          * @param bool $disable Whether to disable the drop-down. Default false.
     481         * @param bool   $disable   Whether to disable the drop-down. Default false.
     482         * @param string $post_type Post type slug.
    481483         */
    482         if ( apply_filters( 'disable_formats_dropdown', false ) ) {
     484        if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) {
    483485            return;
    484486        }
Note: See TracChangeset for help on using the changeset viewer.