'ample-shop-categories-collection', 'description' => esc_html__( 'Add Widget to Display Categories.', 'ample-shop' ) ); parent::__construct( 'Ample_Shop_categories_collection',esc_html__( 'AT: Categories Collection', 'ample-shop' ), $widget_ops, $control_ops ); } function form( $instance ) { $defaults[ 'orderby' ] = ''; for ( $i=0; $i<2; $i++ ) { $var = 'cat_id'.$i; $defaults[$var] = ''; } $instance = wp_parse_args( (array) $instance, $defaults ); $orderby = $instance[ 'orderby' ]; ?>
' ', 'name' => $this->get_field_name( 'cat_id'.$i ), 'selected' => $instance['cat_id'.$i], 'taxonomy' => 'product_cat' ) ); ?>
'product_cat', 'orderby' => esc_attr( $orderby), 'hide_empty' => '0', 'include' => $cat_array, ); if ( !empty( $cat_array ) ) { ?>