From e4f8d5e0bca883e513ce9e841ab20810a95f9970 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 30 Jan 2015 19:29:22 +0000 Subject: [PATCH] Fix 'quick_edit_show_taxonomy' filter so that can properly be used for overrides in all cases. See #26948. Built from https://develop.svn.wordpress.org/trunk@31308 git-svn-id: http://core.svn.wordpress.org/trunk@31289 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-posts-list-table.php | 19 ++++++++----------- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 65c751bf06..960d59a9de 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -945,23 +945,20 @@ class WP_Posts_List_Table extends WP_List_Table { $flat_taxonomies = array(); foreach ( $taxonomy_names as $taxonomy_name ) { + $taxonomy = get_taxonomy( $taxonomy_name ); + + $show_in_quick_edit = $taxonomy->show_in_quick_edit; + /** * Filters whether the current taxonomy should be shown in the Quick Edit panel. * * @since 4.2.0 * - * @param bool $show Whether to show the current taxonomy in Quick Edit. - * Default: true. - * @param string $taxonomy_name Taxonomy name. - * @param string $post_type Post type of current Quick Edit post. + * @param bool $show_in_quick_edit Whether to show the current taxonomy in Quick Edit. + * @param string $taxonomy_name Taxonomy name. + * @param string $post_type Post type of current Quick Edit post. */ - if ( ! apply_filters( 'quick_edit_show_taxonomy', true, $taxonomy_name, $screen->post_type ) ) { - continue; - } - - $taxonomy = get_taxonomy( $taxonomy_name ); - - if ( ! $taxonomy->show_in_quick_edit ) { + if ( ! apply_filters( 'quick_edit_show_taxonomy', $show_in_quick_edit, $taxonomy_name, $screen->post_type ) ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0892b531af..4a3f005558 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31307'; +$wp_version = '4.2-alpha-31308'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.