manage_taxonomies_for_attachment_columns хук-фильтрWP 3.5.0

Filters the taxonomy columns for attachments in the Media list table.

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

add_filter( 'manage_taxonomies_for_attachment_columns', 'wp_kama_manage_taxonomies_for_attachment_columns_filter', 10, 2 );

/**
 * Function for `manage_taxonomies_for_attachment_columns` filter-hook.
 * 
 * @param string[] $taxonomies An array of registered taxonomy names to show for attachments.
 * @param string   $post_type  The post type.
 *
 * @return string[]
 */
function wp_kama_manage_taxonomies_for_attachment_columns_filter( $taxonomies, $post_type ){

	// filter...
	return $taxonomies;
}
$taxonomies(string[])
An array of registered taxonomy names to show for attachments.
$post_type(строка)
The post type.
По умолчанию: 'attachment'

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

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

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

WP_Media_List_Table::get_columns()
manage_taxonomies_for_attachment_columns
wp-admin/includes/class-wp-media-list-table.php 336
$taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' );

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

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