widget_tag_cloud_args хук-фильтрWP 2.8.0

Filters the taxonomy used in the Tag Cloud widget.

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

add_filter( 'widget_tag_cloud_args', 'wp_kama_widget_tag_cloud_args_filter', 10, 2 );

/**
 * Function for `widget_tag_cloud_args` filter-hook.
 * 
 * @param array $args     Args used for the tag cloud widget.
 * @param array $instance Array of settings for the current widget.
 *
 * @return array
 */
function wp_kama_widget_tag_cloud_args_filter( $args, $instance ){

	// filter...
	return $args;
}
$args(массив)
Args used for the tag cloud widget.
$instance(массив)
Array of settings for the current widget.

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

С версии 2.8.0 Введена.
С версии 3.0.0 Added taxonomy drop-down.
С версии 4.9.0 Added the $instance parameter.

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

WP_Widget_Tag_Cloud::widget()
widget_tag_cloud_args
wp-includes/widgets/class-wp-widget-tag-cloud.php 73-81
apply_filters(
	'widget_tag_cloud_args',
	array(
		'taxonomy'   => $current_taxonomy,
		'echo'       => false,
		'show_count' => $show_count,
	),
	$instance
)

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

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