__( 'Only for page builder.', 'maskitto-light' ), 'panels_icon' => 'dashicons dashicons-media-interactive', 'panels_groups' => 'theme-widgets' ) ); } /* Front-end display of widget. */ public function widget( $args, $instance ) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $subtitle = isset( $instance['subtitle'] ) ? esc_attr( $instance['subtitle'] ) : ''; $limit = isset( $instance['limit'] ) ? intval( $instance['limit'] ) : ''; $widget_group = ( isset( $instance['widget_group'] ) ) ? esc_attr( $instance['widget_group'] ) : ''; $show_categories = isset( $instance['show_categories'] ) ? esc_attr( $instance['show_categories'] ) : ''; $show_spaces = isset( $instance['show_spaces'] ) ? esc_attr( $instance['show_spaces'] ) : ''; $hide_text = isset( $instance['hide_text'] ) ? esc_attr( $instance['hide_text'] ) : ''; if( $widget_group ) : $terms = get_terms('category', array( 'post_type' => 'portfolio-item', 'tax_query' => array( array( 'taxonomy' => 'porfolio-group', 'field' => 'slug', 'terms' => $widget_group, ), ), )); else : $terms = get_terms('category', array( 'post_type' => 'portfolio-item' )); endif; $random = rand(11111,88888) ?>