disable_categories_dropdown хук-фильтрWP 4.6.0

Filters whether to remove the 'Categories' drop-down from the post list table.

Использование

add_filter( 'disable_categories_dropdown', 'wp_kama_disable_categories_dropdown_filter', 10, 2 );

/**
 * Function for `disable_categories_dropdown` filter-hook.
 * 
 * @param bool   $disable   Whether to disable the categories drop-down.
 * @param string $post_type Post type slug.
 *
 * @return bool
 */
function wp_kama_disable_categories_dropdown_filter( $disable, $post_type ){

	// filter...
	return $disable;
}
$disable(true|false)
Whether to disable the categories drop-down.
По умолчанию: false
$post_type(строка)
Post type slug.

Список изменений

С версии 4.6.0 Введена.

Где вызывается хук

WP_Posts_List_Table::categories_dropdown()
disable_categories_dropdown
wp-admin/includes/class-wp-posts-list-table.php 475
if ( false !== apply_filters( 'disable_categories_dropdown', false, $post_type ) ) {

Где используется хук в WordPress

Использование не найдено.