PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Fun-Facts Widget */ namespace Elementor; class Tryo_Feature_Box extends Widget_Base { public function get_name() { return 'Feature_Box'; } public function get_title() { return __( 'Feature Box', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-flip-box'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Feature_Box', [ 'label' => __( 'Feature Control', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'icon', [ 'label' => __( 'Icon', 'tryo-toolkit' ), 'type' => Controls_Manager::ICON, 'options' => tryo_icons(), ] ); $this->add_control( 'title', [ 'label' => esc_html__('Title', 'tryo-toolkit'), 'type' => Controls_Manager::TEXT, 'default' => esc_html__('Downloaded', 'tryo-toolkit'), 'label_block' => true, ] ); $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( 'desc', [ 'label' => esc_html__('Description', 'tryo-toolkit'), 'type' => Controls_Manager::TEXTAREA, 'default' => esc_html__('Labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan', 'tryo-toolkit'), 'label_block' => true, ] ); $this->end_controls_section(); $this->start_controls_section( 'funfacts_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}} .single-payment-experience-box h1, .single-payment-experience-box h2, .single-payment-experience-box h3, .single-payment-experience-box h4, .single-payment-experience-box h5, .single-payment-experience-box 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}} .single-payment-experience-box h1, .single-payment-experience-box h2, .single-payment-experience-box h3, .single-payment-experience-box h4, .single-payment-experience-box h5, .single-payment-experience-box h6', ] ); $this->add_control( 'desc_color', [ 'label' => __( 'Description Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .single-payment-experience-box p' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'label' => __( 'Description Typography', 'tryo-toolkit' ), 'scheme' => Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .single-payment-experience-box p', ] ); $this->add_control( 'icon_color', [ 'label' => __( 'Icon Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, ] ); $this->add_control( 'icon_bg_color', [ 'label' => __( 'Icon Background Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, ] ); $this->add_control( 'icon_bg_shape_color', [ 'label' => __( 'Icon Background Shape Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, ] ); $this->add_control( 'hover_icon_bg_color', [ 'label' => __( 'Icon Hover Background Shape Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, ] ); $this->add_control( 'hover_icon_bg_shape_color', [ 'label' => __( 'Icon Hover Background Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); // Inline Editing $this-> add_inline_editing_attributes('title','none'); $random_number = rand(10,1000); ?> <style> .class<?php echo esc_attr( $random_number ); ?>.single-payment-experience-box .icon{ color: <?php echo esc_attr( $settings['icon_color'] ); ?>; } .class<?php echo esc_attr( $random_number ); ?>.single-payment-experience-box .icon{ background-color: <?php echo esc_attr( $settings['icon_bg_color'] ); ?>; } .class<?php echo esc_attr( $random_number ); ?>.single-payment-experience-box .icon::before { background-color: <?php echo esc_attr( $settings['icon_bg_shape_color'] ); ?>; } .class<?php echo esc_attr( $random_number ); ?>.single-payment-experience-box:hover .icon { background-color: <?php echo esc_attr( $settings['hover_icon_bg_color'] ); ?>; } .class<?php echo esc_attr( $random_number ); ?>.single-payment-experience-box:hover .icon::before { background-color: <?php echo esc_attr( $settings['hover_icon_bg_shape_color'] ); ?>; } </style> <div class="single-payment-experience-box class<?php echo esc_attr( $random_number ); ?>"> <?php if( $settings['icon'] != '' ): ?> <div class="icon"> <i class="<?php echo esc_attr( $settings['icon'] ); ?>"></i> </div> <?php endif; ?> <<?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'] ); ?>> <p><?php echo wp_kses_post( $settings['desc'] ); ?></p> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Feature_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]