PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Banner Four Widget */ namespace Elementor; class Tryo_Banner_Four extends Widget_Base { public function get_name() { return 'Tryo_Banner_Four'; } public function get_title() { return __( 'Banner Four', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-banner'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Banner_Four_Area', [ 'label' => __( 'Tryo Banner Area', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'background', 'label' => __( 'Background', 'tryo-toolkit' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .banner-wrapper::before', ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Easy, fee-free banking for entrepreneurs', 'tryo-toolkit'), ] ); $this->add_control( 'title_tag', [ 'label' => esc_html__( 'Title Tag', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1' => esc_html__( 'h1', 'tryo-toolkit' ), 'h2' => esc_html__( 'h2', 'tryo-toolkit' ), 'h3' => esc_html__( 'h3', 'tryo-toolkit' ), 'h4' => esc_html__( 'h4', 'tryo-toolkit' ), 'h5' => esc_html__( 'h5', 'tryo-toolkit' ), 'h6' => esc_html__( 'h6', 'tryo-toolkit' ), ], 'default' => 'h1', ] ); $this->add_control( 'content', [ 'label' => __( 'Content', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXTAREA, 'default' => __('<p>Get the financial tools and insights to start, build, and grow your business.</p>', 'tryo-toolkit'), ] ); $this->add_control( 'button_text', [ 'label' => __( 'Button Text', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Get Started', 'tryo-toolkit'), ] ); $this->add_control( 'link_type', [ 'label' => esc_html__( 'Button Link Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'options' => [ '1' => esc_html__( 'Link To Page', 'tryo-toolkit' ), '2' => esc_html__( 'External Link', 'tryo-toolkit' ), ], ] ); $this->add_control( 'link_to_page', [ 'label' => esc_html__( 'Button Link Page', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'options' => tryo_toolkit_get_page_as_list(), 'condition' => [ 'link_type' => '1', ] ] ); $this->add_control( 'ex_link', [ 'label' => esc_html__('Button External Link', 'tryo-toolkit'), 'type' => Controls_Manager:: TEXT, 'condition' => [ 'link_type' => '2', ] ] ); $this->add_control( 'image', [ 'label' => esc_html__('Section Image', 'tryo-toolkit'), 'type' => Controls_Manager:: MEDIA, ] ); $this->end_controls_section(); $this->start_controls_section( 'banner_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}} .banner-wrapper-content h1, .banner-wrapper-content h2, .banner-wrapper-content h3, .banner-wrapper-content h4, .banner-wrapper-content h5, .banner-wrapper-content h6' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'label' => __( 'Title Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .banner-wrapper-content h1, .banner-wrapper-content h2, .banner-wrapper-content h3, .banner-wrapper-content h4, .banner-wrapper-content h5, .banner-wrapper-content h6', ] ); $this->add_control( 'content_color', [ 'label' => __( 'Content Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .banner-wrapper-content p' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'label' => __( 'Content Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .banner-wrapper-content p', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'btn_typography', 'label' => __( 'Button Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .banner-wrapper-content .btn', ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); // Inline Editing $this-> add_inline_editing_attributes('title','none'); $this-> add_inline_editing_attributes('content','none'); // Get Button Link if( $settings['link_type'] == 1){ $link = get_page_link( $settings['link_to_page'] ); } else { $link = $settings['ex_link']; } 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; ?> <div class="banner-wrapper"> <div class="container-fluid"> <div class="row align-items-center"> <div class="col-lg-6 col-md-12"> <div class="banner-wrapper-content"> <<?php echo esc_attr( $settings['title_tag'] ); ?> <?php echo $this-> get_render_attribute_string('title'); ?>> <?php echo esc_html( $settings['title'] ); ?> </<?php echo esc_attr( $settings['title_tag'] ); ?>> <div <?php echo $this-> get_render_attribute_string('content'); ?>><?php echo wp_kses_post( $settings['content'] ); ?></div> <?php if( $settings['button_text'] != '' ): ?> <a href="<?php echo esc_url( $link ); ?>" class="btn btn-primary"><?php echo esc_html( $settings['button_text'] ); ?></a> <?php endif; ?> </div> </div> <div class="col-lg-6 col-md-12"> <?php if( $settings['image']['url'] != '' ): ?> <div class="banner-wrapper-image"> <img class="<?php echo esc_attr( $lazy_class ); ?>" <?php echo esc_attr( $lazy_attr ); ?>src="<?php echo esc_url( $settings['image']['url'] ); ?>" alt="<?php echo esc_attr( $settings['title'] ); ?>"> </div> <?php endif; ?> </div> </div> </div> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Banner_Four );
[-] 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]