PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Section Widget */ namespace Elementor; class Tryo_Section extends Widget_Base { public function get_name() { return 'Section'; } public function get_title() { return __( 'Section', 'tryo-toolkit' ); } public function get_icon() { return 'fa fa-fast-backward'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Section', [ 'label' => __( 'Tryo Section Controls', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Compare us with others', 'tryo-toolkit'), ] ); $this->add_control( 'content', [ 'label' => __( 'Content', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXTAREA, 'default' => __('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'tryo-toolkit'), ] ); $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->end_controls_section(); $this->start_controls_section( 'section_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}} .section-title 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' => 60, 'step' => 1, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'selectors' => [ '{{WRAPPER}} .section-title h2' => 'font-size: {{SIZE}}px;', ], ] ); $this->add_control( 'content_color', [ 'label' => __( 'Content Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .section-title 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}} .section-title p' => 'font-size: {{SIZE}}px;', ], ] ); $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'); ?> <div class="section-title"> <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 else: ?> <br> <?php endif; ?> <p <?php echo $this-> get_render_attribute_string('content'); ?>><?php echo esc_html( $settings['content'] ); ?></p> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Section );
[-] 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]