start_controls_section( 'google_review', [ 'label' => esc_html__( 'Thinkai Google Review', 'thinkai' ), ] ); $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'), ), ] ); //Review Title $this->add_control( 'review_title', [ 'label' => __( 'Review Title', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( 'Google Reviews', 'thinkai' ), ] ); //Rating $this->add_control( 'rating', [ 'label' => esc_html__( 'Total Rating', 'thinkai' ), 'label_block' => true, 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => array( '1' => esc_html__( 'One Star ', 'thinkai'), '2' => esc_html__( 'Two Star ', 'thinkai'), '3' => esc_html__( 'Three Star ', 'thinkai'), '4' => esc_html__( 'Four Star ', 'thinkai'), '5' => esc_html__( 'Five Star ', 'thinkai'), ), ] ); //Total Title $this->add_control( 'total_rating', [ 'label' => __( 'Total Rating Average', 'thinkai' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( '4.9/5.0', 'thinkai' ), ] ); //rating_description $this->add_control( 'rating_description', [ 'label' => __( 'Description', 'thinkai' ), 'type' => Controls_Manager::TEXTAREA, 'label_block' => true, 'dynamic' => [ 'active' => true, ], 'default' => esc_html__( '(from 20k reviews)', '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'); $layout = $settings[ 'layout_control' ]; ?>

    '; else echo '
  • '; } ?>