/
home
/
rekodeb
/
webmars
/
wp-content
/
plugins
/
calmor-core
/
widgets
/
Upload File
HOME
<?php namespace calmorCore\Widgets; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Group_Control_Background; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Text_Shadow; // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Text Typing Effect * * Elementor widget for text typing effect. * * @since 1.7.0 */ class calmor_client extends Widget_Base { public function get_name() { return 'calmor-client'; } public function get_title() { return __( 'Calmer Client', 'calmor-core' ); } public function get_icon() { return 'eicon-device-desktop'; } public function get_categories() { return [ 'calmor-elements' ]; } protected function _register_controls() { // ---------------------------------------- client Style ------------------------------ $this->start_controls_section( 'client_style', [ 'label' => __( 'Client Info', 'calmor-core' ), ] ); $this->add_control( 'sec_sub_title', [ 'label' => esc_html__( 'Title Text', 'calmor-core' ), 'description' => esc_html__( 'Use <br> tag for line breaking.', 'calmor-core' ), 'type' => Controls_Manager::WYSIWYG, 'label_block' => true, 'default' => 'Welcome to Droit Child Care', ] ); $this->end_controls_section(); // End content $client = new \Elementor\Repeater(); $this->start_controls_section( 'client_images_features_sec', [ 'label' => __( 'Client List', 'calmor-core' ), ] ); $client->add_control( 'client_title', [ 'label' => __( ' Client Title', 'calmor-core' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => 'Best Design client' ] ); $client->add_control( 'client_image', [ 'label' => esc_html__( 'Choose Image', 'calmor-core' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'feature_client', [ 'label' => __( 'Client Logo', 'calmor-core' ), 'type' => Controls_Manager::REPEATER, 'title_field' => '{{{ client_title }}}', 'fields' => $client->get_controls(), ] ); $this->end_controls_section(); $this->start_controls_section( 'style_sec_content', [ 'label' => __( 'Content Style', 'calmor-core' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'color__sub_title', [ 'label' => __( 'Text Color', 'calmor-core' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .client h3' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'typography_sub_title', 'selector' => ' {{WRAPPER}} .client h3, ' ] ); $this->add_control( 'client_light_title', [ 'label' => __( 'Light Text Color', 'calmor-core' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .span_brand' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'typography_light_text', 'selector' => ' {{WRAPPER}} .span_brand, ' ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings(); $feature_client = isset($settings['feature_client']) ? $settings['feature_client'] : ''; ?> <!-- Clients --> <section class="client"> <div class="container"> <div class="client_title wow fadeInLeft" data-wow-delay="0.1s"> <?php if(!empty($settings['sec_sub_title'])): ?> <h2><?php echo $settings['sec_sub_title']; ?></h2> <?php endif; ?> </div> <div class="min_client_area"> <?php if ( is_array( $feature_client ) && count( $feature_client ) > 0 ) { $i=1; foreach ( $feature_client as $feature_cl ) { ?> <img src="<?php echo esc_url($feature_cl['client_image']['url']); ?>" alt="" class="wow fadeInLeft" data-wow-delay="0.3s"> <?php } } ?> </div> </div> </section> <!-- Clients --> <?php } }