WordPress.org

Make WordPress Core

Changeset 31308


Ignore:
Timestamp:
01/30/2015 07:28:27 PM (5 years ago)
Author:
boonebgorges
Message:

Fix 'quick_edit_show_taxonomy' filter so that can properly be used for overrides in all cases.

See #26948.

File:
1 edited

Legend:

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

    r31307 r31308  
    946946        foreach ( $taxonomy_names as $taxonomy_name ) {
    947947
     948            $taxonomy = get_taxonomy( $taxonomy_name );
     949
     950            $show_in_quick_edit = $taxonomy->show_in_quick_edit;
     951
    948952            /**
    949953             * Filters whether the current taxonomy should be shown in the Quick Edit panel.
     
    951955             * @since 4.2.0
    952956             *
    953              * @param bool   $show          Whether to show the current taxonomy in Quick Edit.
    954              *                              Default: true.
    955              * @param string $taxonomy_name Taxonomy name.
    956              * @param string $post_type     Post type of current Quick Edit post.
     957             * @param bool   $show_in_quick_edit Whether to show the current taxonomy in Quick Edit.
     958             * @param string $taxonomy_name      Taxonomy name.
     959             * @param string $post_type          Post type of current Quick Edit post.
    957960             */
    958             if ( ! apply_filters( 'quick_edit_show_taxonomy', true, $taxonomy_name, $screen->post_type ) ) {
    959                 continue;
    960             }
    961 
    962             $taxonomy = get_taxonomy( $taxonomy_name );
    963 
    964             if ( ! $taxonomy->show_in_quick_edit ) {
     961            if ( ! apply_filters( 'quick_edit_show_taxonomy', $show_in_quick_edit, $taxonomy_name, $screen->post_type ) ) {
    965962                continue;
    966963            }
Note: See TracChangeset for help on using the changeset viewer.