Make WordPress Core

Ticket #47959: 47959.patch

File 47959.patch, 537 bytes (added by MatheusFD, 6 years ago)

Post type is now passed into the filter.

  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    479479                 *
    480480                 * @param bool $disable Whether to disable the drop-down. Default false.
    481481                 */
    482                 if ( apply_filters( 'disable_formats_dropdown', false ) ) {
     482                if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) {
    483483                        return;
    484484                }
    485485