Make WordPress Core

Ticket #47959: 47959-2.diff

File 47959-2.diff, 739 bytes (added by birgire, 6 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git src/wp-admin/includes/class-wp-posts-list-table.php src/wp-admin/includes/class-wp-posts-list-table.php
    index 71c77d8..01eeafe 100644
    class WP_Posts_List_Table extends WP_List_Table { 
    476476                 * Filters whether to remove the 'Formats' drop-down from the post list table.
    477477                 *
    478478                 * @since 5.2.0
     479                 * @since 5.3.0 The `$post_type` parameter was added.
    479480                 *
    480481                 * @param bool $disable Whether to disable the drop-down. Default false.
    481482                 */
    482                 if ( apply_filters( 'disable_formats_dropdown', false ) ) {
     483                if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) {
    483484                        return;
    484485                }
    485486