start_controls_section( 'our_cases', [ 'label' => esc_html__( 'Thinkai Our Cases', 'thinkai' ), ] ); //Layout $this->add_control( 'layout_control', [ 'label' => esc_html__( 'Layout Style', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => array( '1' => esc_html__( 'Style One ', 'thinkai'), '2' => esc_html__( 'Style Two ', 'thinkai'), ), ] ); //Banner Carousel Repeater $repeater = new Repeater(); $repeater->add_control( 'author_img', [ 'label' => __( 'Author Image', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], ] ); $repeater->add_control( 'author_subtitle', [ 'label' => __( 'Author Sub Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your subtitle', 'thinkai' ), ] ); $repeater->add_control( 'author_title', [ 'label' => __( 'Author Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your author title', 'thinkai' ), ] ); //Icon $repeater->add_control( 'icon', [ 'label' => esc_html__('Enter The icons', 'thinkai'), 'type' => \Elementor\Controls_Manager::ICONS, 'default' => [ 'value' => 'icon-graduation', 'library' => 'solid', ], ] ); $repeater->add_control( 'category_title', [ 'label' => __( 'Category Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your category title', 'thinkai' ), ] ); $repeater->add_control( 'category_link', [ 'label' => __( 'Category Link', 'thinkai' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __( 'https://your-link.com', 'thinkai' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], ] ); //Button Title $repeater->add_control( 'btn_title', [ 'label' => __( 'Button Title', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Read More', 'thinkai' ), ] ); $repeater->add_control( 'link_option', [ 'label' => esc_html__( 'Select link Option', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => 'extranal', 'options' => array( 'extranal' => esc_html__( 'Extranal ', 'thinkai'), 'page' => esc_html__( 'Page ', 'thinkai'), ), ] ); $repeater->add_control( 'link', [ 'label' => __( 'External Link', 'thinkai' ), 'type' => Controls_Manager::URL, 'label_block' => true, 'placeholder' => __( 'https://your-link.com', 'thinkai' ), 'show_external' => true, 'default' => [ 'url' => '', 'is_external' => true, 'nofollow' => true, ], 'condition' => [ 'link_option' => 'extranal', ] ] ); $repeater->add_control( 'page_select', [ 'label' => esc_html__( 'Select Page', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT2, 'default' => 'extranal', 'options' => thinkai_page_list(), 'condition' => [ 'link_option' => 'page', ] ] ); $repeater->add_control( 'feature_img', [ 'label' => __( 'Feature Image', 'thinkai' ), 'type' => Controls_Manager::MEDIA, 'default' => ['url' => Utils::get_placeholder_image_src(),], ] ); //Title $repeater->add_control( 'title', [ 'label' => __( 'Title', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, ], 'placeholder' => __( 'Enter your Title', 'thinkai' ), ] ); $this->add_control( 'cases', [ 'label' => __('Add Case Item', 'thinkai'), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{{ author_title }}}', 'default' => [ [ 'author_subtitle' => esc_html__( 'Voice by', 'thinkai' ), 'author_title' => esc_html__( 'Evelyn Scarlett', 'thinkai' ), 'category_title' => esc_html__( 'Education', 'thinkai' ), 'category_link' => esc_html__( '#', 'thinkai' ), 'btn_title' => esc_html__( 'Read More', 'thinkai' ), 'btn_link' => esc_html__( '#', 'thinkai' ), 'title' => esc_html__( 'Create Education Content now Using ThinkAi', 'thinkai' ), ], [ 'author_subtitle' => esc_html__( 'Voice by', 'thinkai' ), 'author_title' => esc_html__( 'Richard Frederick', 'thinkai' ), 'category_title' => esc_html__( 'Youtube Videos', 'thinkai' ), 'category_link' => esc_html__( '#', 'thinkai' ), 'btn_title' => esc_html__( 'Read More', 'thinkai' ), 'btn_link' => esc_html__( '#', 'thinkai' ), 'title' => esc_html__( 'Simplify the Narration Process of your YouTube Videos', 'thinkai' ), ], [ 'author_subtitle' => esc_html__( 'Voice by', 'thinkai' ), 'author_title' => esc_html__( 'Rowan Grayson', 'thinkai' ), 'category_title' => esc_html__( 'Advertisement', 'thinkai' ), 'category_link' => esc_html__( '#', 'thinkai' ), 'btn_title' => esc_html__( 'Read More', 'thinkai' ), 'btn_link' => esc_html__( '#', 'thinkai' ), 'title' => esc_html__( 'Create Engaging & Persuasive Advertisements', 'thinkai' ), ], ], ] ); $this->end_controls_section(); } /** * Render button widget output on the frontend. * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); $allowed_tags = wp_kses_allowed_html('post'); ?>