quick_edit_show_taxonomy
Filters whether the current taxonomy should be shown in the Quick Edit panel.
Использование
add_filter( 'quick_edit_show_taxonomy', 'wp_kama_quick_edit_show_taxonomy_filter', 10, 3 );
/**
* Function for `quick_edit_show_taxonomy` filter-hook.
*
* @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.
*
* @return bool
*/
function wp_kama_quick_edit_show_taxonomy_filter( $show_in_quick_edit, $taxonomy_name, $post_type ){
// filter...
return $show_in_quick_edit;
}
- $show_in_quick_edit(true|false)
- Whether to show the current taxonomy in Quick Edit.
- $taxonomy_name(строка)
- Taxonomy name.
- $post_type(строка)
- Post type of current Quick Edit post.
Список изменений
| С версии 4.2.0 | Введена. |
Где вызывается хук
quick_edit_show_taxonomy
quick_edit_show_taxonomy
wp-admin/includes/class-wp-posts-list-table.php 1645
if ( ! apply_filters( 'quick_edit_show_taxonomy', $show_in_quick_edit, $taxonomy_name, $screen->post_type ) ) {
wp-admin/includes/ajax-actions.php 2137
if ( ! apply_filters( 'quick_edit_show_taxonomy', $tax_object->show_in_quick_edit, $taxonomy, $post['post_type'] ) ) {