disable_formats_dropdown хук-фильтрWP 5.2.0

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

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

add_filter( 'disable_formats_dropdown', 'wp_kama_disable_formats_dropdown_filter', 10, 2 );

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

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

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

С версии 5.2.0 Введена.
С версии 5.5.0 The $post_type parameter was added.

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

WP_Posts_List_Table::formats_dropdown()
disable_formats_dropdown
wp-admin/includes/class-wp-posts-list-table.php 513
if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) {

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

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