PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Information Box Widget */ namespace Elementor; class Tryo_Information_Box extends Widget_Base { public function get_name() { return 'Information_Box'; } public function get_title() { return __( 'Information Box', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-info-circle-o'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Information_Box', [ 'label' => __( 'Information Controls', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'card_style', [ 'label' => __( 'Box Style', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'default' => 'without_btn', 'options' => [ 'without_btn' => __( 'Without Button', 'tryo-toolkit' ), 'with_btn' => __( 'With Button', 'tryo-toolkit' ), ], ] ); $this->add_control( 'left_btn_top_title', [ 'label' => __( 'Left Button Top Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Download on', 'tryo-toolkit'), 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'left_btn_link', [ 'label' => __( 'Left Button Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'left_btn_title', [ 'label' => __( 'Left Button Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('App Store', 'tryo-toolkit'), 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'left_font_type', [ 'label' => __( 'Left ButtonFont Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'default' => 'flat-icon', 'options' => [ 'flat-icon' => __( 'Flat-Icon', 'tryo-toolkit' ), 'fa-icon' => __( 'Font-Awesome', 'tryo-toolkit' ), ], 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'left_flat_icon', [ 'label' => __( 'Left Button Flat Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'flaticon-piggy-bank' => __('piggy-bank', 'tryo-toolkit' ), 'flaticon-data-encryption' => __('data-encryption', 'tryo-toolkit' ), 'flaticon-wallet' => __('wallet', 'tryo-toolkit' ), 'flaticon-shield' => __('shield', 'tryo-toolkit' ), 'flaticon-user' => __('user', 'tryo-toolkit' ), 'flaticon-check-mark' => __('check-mark', 'tryo-toolkit' ), 'flaticon-settings' => __('settings', 'tryo-toolkit' ), 'flaticon-envelope-of-white-paper' => __('envelope-of-white-paper', 'tryo-toolkit' ), 'flaticon-menu' => __('menu', 'tryo-toolkit' ), 'flaticon-info' => __('info', 'tryo-toolkit' ), 'flaticon-cursor' => __('cursor', 'tryo-toolkit' ), 'flaticon-alarm' => __('alarm', 'tryo-toolkit' ), 'flaticon-cancel' => __('cancel', 'tryo-toolkit' ), 'flaticon-apple' => __('apple', 'tryo-toolkit' ), 'flaticon-play-store' => __('play-store', 'tryo-toolkit' ), ], 'condition' => [ 'left_font_type' => 'flat-icon', ] ] ); $this->add_control( 'left_icon', [ 'label' => __( 'Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'condition' => [ 'right_font_type' => 'fa-icon', ] ] ); $this->add_control( 'right_btn_top_title', [ 'label' => __( 'Right Button Top Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Download on', 'tryo-toolkit'), 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'right_btn_title', [ 'label' => __( 'Right Button Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Google play', 'tryo-toolkit'), 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'right_btn_link', [ 'label' => __( 'Right Button Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'right_font_type', [ 'label' => __( 'Right ButtonFont Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'default' => 'flat-icon', 'options' => [ 'flat-icon' => __( 'Flat-Icon', 'tryo-toolkit' ), 'fa-icon' => __( 'Font-Awesome', 'tryo-toolkit' ), ], 'condition' => [ 'card_style' => 'with_btn', ] ] ); $this->add_control( 'right_flat_icon', [ 'label' => __( 'Right Button Flat Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'flaticon-piggy-bank' => __('piggy-bank', 'tryo-toolkit' ), 'flaticon-data-encryption' => __('data-encryption', 'tryo-toolkit' ), 'flaticon-wallet' => __('wallet', 'tryo-toolkit' ), 'flaticon-shield' => __('shield', 'tryo-toolkit' ), 'flaticon-user' => __('user', 'tryo-toolkit' ), 'flaticon-check-mark' => __('check-mark', 'tryo-toolkit' ), 'flaticon-settings' => __('settings', 'tryo-toolkit' ), 'flaticon-envelope-of-white-paper' => __('envelope-of-white-paper', 'tryo-toolkit' ), 'flaticon-menu' => __('menu', 'tryo-toolkit' ), 'flaticon-info' => __('info', 'tryo-toolkit' ), 'flaticon-cursor' => __('cursor', 'tryo-toolkit' ), 'flaticon-alarm' => __('alarm', 'tryo-toolkit' ), 'flaticon-cancel' => __('cancel', 'tryo-toolkit' ), 'flaticon-apple' => __('apple', 'tryo-toolkit' ), 'flaticon-play-store' => __('play-store', 'tryo-toolkit' ), ], 'condition' => [ 'right_font_type' => 'flat-icon', ] ] ); $this->add_control( 'right_icon', [ 'label' => __( 'Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'condition' => [ 'right_font_type' => 'fa-icon', ] ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('$0.00 / mo', 'tryo-toolkit'), 'condition' => [ 'card_style' => 'without_btn', ] ] ); $this->add_control( 'content', [ 'label' => __( 'Short Description', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Free account available', 'tryo-toolkit'), 'condition' => [ 'card_style' => 'without_btn', ] ] ); $this->add_control( 'font_type', [ 'label' => __( 'Font Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'default' => 'flat-icon', 'options' => [ 'flat-icon' => __( 'Flat-Icon', 'tryo-toolkit' ), 'fa-icon' => __( 'Font-Awesome', 'tryo-toolkit' ), ], 'condition' => [ 'card_style' => 'without_btn', ] ] ); $this->add_control( 'flat-icon', [ 'label' => __( 'Flat Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'flaticon-piggy-bank' => __('piggy-bank', 'tryo-toolkit' ), 'flaticon-data-encryption' => __('data-encryption', 'tryo-toolkit' ), 'flaticon-wallet' => __('wallet', 'tryo-toolkit' ), 'flaticon-shield' => __('shield', 'tryo-toolkit' ), 'flaticon-user' => __('user', 'tryo-toolkit' ), 'flaticon-check-mark' => __('check-mark', 'tryo-toolkit' ), 'flaticon-settings' => __('settings', 'tryo-toolkit' ), 'flaticon-envelope-of-white-paper' => __('envelope-of-white-paper', 'tryo-toolkit' ), 'flaticon-menu' => __('menu', 'tryo-toolkit' ), 'flaticon-info' => __('info', 'tryo-toolkit' ), 'flaticon-cursor' => __('cursor', 'tryo-toolkit' ), 'flaticon-alarm' => __('alarm', 'tryo-toolkit' ), 'flaticon-cancel' => __('cancel', 'tryo-toolkit' ), 'flaticon-apple' => __('apple', 'tryo-toolkit' ), 'flaticon-play-store' => __('play-store', 'tryo-toolkit' ), ], 'condition' => [ 'font_type' => 'flat-icon', 'card_style' => 'without_btn', ] ] ); $this->add_control( 'icon', [ 'label' => __( 'Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'condition' => [ 'font_type' => 'fa-icon', ] ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'card_style' => 'without_btn', ] ] ); $this->add_control( 'icon_bg_color', [ 'label' => __( 'Icon Background Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-information-box .icon' => 'background-color: {{VALUE}}', ], 'condition' => [ 'card_style' => 'without_btn', ] ] ); $this->add_control( 'title_color', [ 'label' => __( 'Title Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-information-box h3' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'title_size', [ 'label' => __( 'Title Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 60, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .single-information-box h3' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'content_color', [ 'label' => __( 'Short Content Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-information-box p' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'content_size', [ 'label' => __( 'Short Content Font Size', 'tryo-toolkit' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 30, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .single-information-box p' => 'font-size: {{SIZE}}px;', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); ?> <?php if( $settings['card_style'] == 'without_btn' ): // Inline Editing $this-> add_inline_editing_attributes('title','none'); $this-> add_inline_editing_attributes('content','none'); if( $settings['font_type'] == 'flat-icon') { $icon = $settings['flat-icon']; }else { $icon =$settings['fa-icon']; } ?> <div class="single-information-box"> <div class="icon"> <i class="<?php echo esc_attr($icon); ?>"></i> </div> <h3 <?php echo $this-> get_render_attribute_string('title'); ?>><?php echo esc_html( $settings['title'] ); ?></h3> <p <?php echo $this-> get_render_attribute_string('content'); ?>><?php echo esc_html( $settings['content'] ); ?></p> </div> <?php else: // Inline Editing $this-> add_inline_editing_attributes('title','none'); $this-> add_inline_editing_attributes('content','none'); // Left Button Icon if( $settings['left_font_type'] == 'flat-icon') { $left_icon = $settings['flat-icon']; }else { $left_icon = $settings['fa-icon']; } // Right Button Icon if( $settings['right_font_type'] == 'flat-icon') { $right_icon = $settings['right_flat_icon']; }else { $right_icon = $settings['right_icon']; } // Left Button Icon if( $settings['left_font_type'] == 'flat-icon') { $left_icon = $settings['left_flat_icon']; }else { $left_icon = $settings['left_icon']; } ?> <div class="single-information-box pl-0"> <div class="btn-box"> <?php if( $settings['left_btn_link']['url'] != '' ): ?> <a href="<?php echo esc_url( $settings['left_btn_link']['url'] ); ?>" class="app-store-btn"> <i class="<?php echo esc_attr($left_icon); ?>"></i> <?php echo esc_html( $settings['left_btn_top_title'] ); ?> <span><?php echo esc_html( $settings['left_btn_title'] ); ?></span> </a> <?php endif; ?> <?php if( $settings['right_btn_link']['url'] != '' ): ?> <a href="<?php echo esc_url( $settings['right_btn_link']['url'] ); ?>" class="play-store-btn"> <i class="<?php echo esc_attr($right_icon); ?>"></i> <?php echo esc_html( $settings['right_btn_top_title'] ); ?> <span><?php echo esc_html( $settings['right_btn_title'] ); ?></span> </a> <?php endif; ?> </div> </div> <?php endif; ?> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Information_Box );
[-] banner-feature.php
[edit]
[-] profile-form.php
[edit]
[-] business-area.php
[edit]
[-] services-two.php
[edit]
[-] banner-two.php
[edit]
[-] signup.php
[edit]
[+]
..
[-] payment-experience-area.php
[edit]
[-] post.php
[edit]
[-] works.php
[edit]
[-] account-create.php
[edit]
[-] comparisons-table.php
[edit]
[-] partner-slider.php
[edit]
[-] app-download.php
[edit]
[-] feature-box.php
[edit]
[-] team.php
[edit]
[-] global-area.php
[edit]
[-] userinfo-details.php
[edit]
[-] banner-three.php
[edit]
[-] pricing.php
[edit]
[-] success-story-area.php
[edit]
[-] contact-card.php
[edit]
[-] contact-cta-box.php
[edit]
[-] services-area.php
[edit]
[-] ready-to-talk.php
[edit]
[-] section.php
[edit]
[-] receive-details.php
[edit]
[-] about-area.php
[edit]
[-] banner-four.php
[edit]
[-] send-details.php
[edit]
[-] support-area.php
[edit]
[-] invoicing.php
[edit]
[-] testimonials.php
[edit]
[-] funfact.php
[edit]
[-] signin.php
[edit]
[-] information-box.php
[edit]
[-] new-payment.php
[edit]
[-] banner-one.php
[edit]
[-] feedback-card.php
[edit]
[-] feature.php
[edit]