start_controls_section( 'section_title', [ 'label' => esc_html__( 'Vehicle Archive Attributes', 'ad-integration-for-mobile-de-api' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT ] ); $options = []; $terms = get_terms([ 'taxonomy' => 'mobile_api_vehicle_category', 'hide_empty' => false ]); foreach ( $terms as $term ) $options[$term->slug] = $term->name; $this->add_control( 'category', [ 'label' => esc_html__( 'Vehicle Category', 'ad-integration-for-mobile-de-api' ), 'type' => \Elementor\Controls_Manager::SELECT2, 'label_block' => true, 'multiple' => true, 'default' => '', 'options' => $options ] ); $this->end_controls_section(); } protected function render() { $atts = $this->get_settings_for_display(); echo wp_kses_post( mobile_api_shortcode_vehicle_archive( $atts ) ); } }