WordPress at Your Fingertips
function is not described

WC_Widget_Product_Tag_Cloud::widget() public WC 1.0

Output widget.

{} It's a method of the class: WC_Widget_Product_Tag_Cloud{}

Return

null. Nothing.

Usage

$WC_Widget_Product_Tag_Cloud = new WC_Widget_Product_Tag_Cloud();
$WC_Widget_Product_Tag_Cloud->widget( $args, $instance );
$args(array) (required)
Arguments.
$instance(array) (required)
Widget instance.

Notes

Code of WC_Widget_Product_Tag_Cloud::widget() WC 5.8.0

public function widget( $args, $instance ) {
	$current_taxonomy = $this->get_current_taxonomy( $instance );

	if ( empty( $instance['title'] ) ) {
		$taxonomy          = get_taxonomy( $current_taxonomy );
		$instance['title'] = $taxonomy->labels->name;
	}

	$this->widget_start( $args, $instance );

	echo '<div class="tagcloud">';

	wp_tag_cloud(
		apply_filters(
			'woocommerce_product_tag_cloud_widget_args',
			array(
				'taxonomy'                  => $current_taxonomy,
				'topic_count_text_callback' => array( $this, 'topic_count_text' ),
			)
		)
	);

	echo '</div>';

	$this->widget_end( $args );
}