PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Download Area Widget */ namespace Elementor; class Tryo_Download_Area extends Widget_Base { public function get_name() { return 'Download_Area'; } public function get_title() { return __( 'App Download', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-download-button'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Download_section', [ 'label' => __( 'Download Area Control', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('You can find all the thing you need to payout', 'tryo-toolkit'), ] ); $this->add_control( 'description', [ 'label' => __( 'Description', 'tryo-toolkit' ), 'type' => Controls_Manager::WYSIWYG, 'default' => __('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.', 'tryo-toolkit'), ] ); $this->add_control( 'image', [ 'label' => __( 'Section Image', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'left_button_top_title', [ 'label' => __( 'Left Button Top Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Download on', 'tryo-toolkit'), ] ); $this->add_control( 'left_button_title', [ 'label' => __( 'Left Button Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('App Store', 'tryo-toolkit'), ] ); $this->add_control( 'left_button_link', [ 'label' => __( 'Left Button Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, ] ); $this->add_control( 'left_font_type', [ 'label' => __( 'Left Button Font Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'default' => 'default-icon', 'options' => [ 'default-icon' => __( 'Default Icon', 'tryo-toolkit' ), 'fa-icon' => __( 'Font-Awesome', 'tryo-toolkit' ), ], ] ); $this->add_control( 'left_icon', [ 'label' => __( 'Left Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'condition' => [ 'left_font_type' => 'fa-icon', ] ] ); $this->add_control( 'right_button_top_title', [ 'label' => __( 'Right Button Top Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Download on', 'tryo-toolkit'), ] ); $this->add_control( 'right_button_title', [ 'label' => __( 'Right Button Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Google play', 'tryo-toolkit'), ] ); $this->add_control( 'right_button_link', [ 'label' => __( 'Right Button Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, ] ); $this->add_control( 'right_font_type', [ 'label' => __( 'Right Button Font Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'default' => 'default-icon', 'options' => [ 'default-icon' => __( 'Default Icon', 'tryo-toolkit' ), 'fa-icon' => __( 'Font-Awesome', 'tryo-toolkit' ), ], ] ); $this->add_control( 'right_icon', [ 'label' => __( 'Right Icons', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'condition' => [ 'right_font_type' => 'fa-icon', ] ] ); $this->end_controls_section(); $this->start_controls_section( 'download_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'title_color', [ 'label' => __( 'Title Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .app-download-content h2' => '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' => 70, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .app-download-content h2' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'show_title_shape', [ 'label' => __( 'Show Title Animation', 'tryo' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'tryo' ), 'label_off' => __( 'Hide', 'tryo' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'content_color', [ 'label' => __( 'Content Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .app-download-content p' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'content_size', [ 'label' => __( '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}} .app-download-content p' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'show_image_shape', [ 'label' => __( 'Show Image Animation', 'tryo' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'tryo' ), 'label_off' => __( 'Hide', 'tryo' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); global $tryo_opt; if( isset( $tryo_opt['enable_lazyloader'] ) ): $is_lazyloader = $tryo_opt['enable_lazyloader']; else: $is_lazyloader = true; endif; if( $is_lazyloader == true ): $lazy_class = 'smartify'; $lazy_attr = 'sm-'; else: $lazy_class = ''; $lazy_attr = ''; endif; // Inline Editing $this-> add_inline_editing_attributes('title','none'); $this-> add_inline_editing_attributes('description','none'); ?> <div class="app-download-area"> <div class="container"> <div class="row align-items-center"> <div class="col-lg-6 col-md-12"> <div class="app-image"> <div class="main-image"> <?php if( $settings['image']['url'] == '' ): ?> <img class="<?php echo esc_attr($lazy_class); ?> wow fadeInLeft animated" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url(get_template_directory_uri() .'/assets/img/mobile-app1.png' ); ?>" data-wow-delay="0.6s" alt="<?php echo esc_attr__( 'Download App', 'tryo' ); ?>" style="visibility: visible; animation-delay: 0.6s; animation-name: fadeInLeft;"> <img class="<?php echo esc_attr($lazy_class); ?> wow fadeInUp animated" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url(get_template_directory_uri() .'/assets/img/mobile-app2.png' ); ?>" data-wow-delay="0.9s" alt="<?php echo esc_attr__( 'Download App', 'tryo' ); ?>" style="visibility: visible; animation-delay: 0.9s; animation-name: fadeInUp;"> <?php else: ?> <img class="<?php echo esc_attr($lazy_class); ?> wow fadeInLeft animated" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $settings['image']['url'] ); ?>" data-wow-delay="0.6s" alt="<?php echo esc_attr__( 'Download App', 'tryo' ); ?>" style="visibility: visible; animation-delay: 0.6s; animation-name: fadeInLeft;"> <?php endif; ?> </div> <div class="main-mobile-image"> <?php if( $settings['image']['url'] == '' ): ?> <img class="<?php echo esc_attr($lazy_class); ?> wow fadeInUp" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url(get_template_directory_uri() .'/assets/img/main-mobile.png' ); ?>" data-wow-delay="0.6s" alt="<?php echo esc_attr__( 'Download App', 'tryo' ); ?>" style="animation-delay: 0.6s; animation-name: none;"> <?php else: ?> <img class="<?php echo esc_attr($lazy_class); ?> wow fadeInLeft animated" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url( $settings['image']['url'] ); ?>" data-wow-delay="0.6s" alt="<?php echo esc_attr__( 'Download App', 'tryo' ); ?>" style="visibility: visible; animation-delay: 0.6s; animation-name: fadeInLeft;"> <?php endif; ?> </div> <?php if( $settings['show_image_shape'] == 'yes' ): ?> <div class="circle-img"> <img class="<?php echo esc_attr($lazy_class); ?>" <?php echo esc_attr($lazy_attr); ?>src="<?php echo esc_url(get_template_directory_uri() .'/assets/img/circle.png' ); ?>" alt="<?php echo esc_attr__( 'Download App', 'tryo' ); ?>"> </div> <?php endif; ?> </div> </div> <div class="col-lg-6 col-md-12"> <div class="app-download-content"> <h2 <?php echo $this-> get_render_attribute_string('title'); ?>><?php echo esc_html( $settings['title'] ); ?></h2> <?php if( $settings['show_title_shape'] == 'yes' ): ?> <div class="bar"></div> <?php endif; ?> <p <?php echo $this-> get_render_attribute_string('description'); ?>><?php echo $settings['description']; ?></p> <div class="btn-box"> <?php if( $settings['left_button_link']['url'] != '' ): ?> <a href="<?php echo esc_url( $settings['left_button_link']['url'] ); ?>" class="app-store-btn"> <?php if( $settings['left_font_type'] == 'default-icon' ): ?> <i class="flaticon-apple"></i> <?php else: ?> <i class="<?php echo esc_attr( $settings['left_icon'] ); ?>"></i> <?php endif; ?> <?php echo esc_html( $settings['left_button_top_title'] ); ?> <span><?php echo esc_html( $settings['left_button_title'] ); ?></span> </a> <?php endif; ?> <?php if( $settings['right_button_link']['url'] != '' ): ?> <a href="<?php echo esc_url( $settings['right_button_link']['url'] ); ?>" class="play-store-btn"> <?php if( $settings['right_font_type'] == 'default-icon' ): ?> <i class="flaticon-play-store"></i> <?php else: ?> <i class="<?php echo esc_attr( $settings['right_icon'] ); ?>"></i> <?php endif; ?> <?php echo esc_html( $settings['right_button_top_title'] ); ?> <span><?php echo esc_html( $settings['right_button_title'] ); ?></span> </a> <?php endif; ?> </div> </div> </div> </div> </div> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Download_Area );
[-] 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]