start_controls_section( 'course_search_section', [ 'label' => __('Search Section', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_responsive_control( 'course_search_placeholder', [ 'label' => __('Placeholder', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::TEXT, 'default' => __('Search courses...', 'acadlix-addon-for-elementor'), 'placeholder' => __('Type your placeholder here', 'acadlix-addon-for-elementor'), ] ); $this->end_controls_section(); } protected function register_style_controls() { $search_input = '{{WRAPPER}} .aelms-course-search-input'; $this->start_controls_section( 'course_search_style_section', [ 'label' => __('Search Style', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'course_search_input_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( $search_input => 'color: {{VALUE}};', ), ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'course_search_input_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$search_input}", ) ); $this->add_control( 'course_search_input_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$search_input}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'default' => [ 'top' => 2, 'right' => 2, 'bottom' => 2, 'left' => 2, 'unit' => 'px', 'isLinked' => false, ], ) ); $this->end_controls_section(); } protected function render() { ob_start(); $settings = $this->get_settings_for_display(); include AELMS_PLUGIN_DIR . 'templates/course/search.php'; $html = ob_get_clean(); echo wp_kses($html, aelms_allowed_html()); } }