WC_Widget_Product_Tag_Cloud::widget()
Output widget.
Method of the class: WC_Widget_Product_Tag_Cloud{}
Hooks from the method
Return
null
. Nothing (null).
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
- See: WP_Widget
WC_Widget_Product_Tag_Cloud::widget() WC Widget Product Tag Cloud::widget code WC 9.3.3
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 ); }