PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Account Create Widget */ namespace Elementor; class Tryo_Account extends Widget_Base { public function get_name() { return 'Tryo_Account'; } public function get_title() { return __( 'Create Account Area', 'tryo-toolkit' ); } public function get_icon() { return 'eicon-plus-circle-o'; } public function get_categories() { return [ 'tryo-elements' ]; } protected function _register_controls() { $this->start_controls_section( 'Tryo_Account', [ 'label' => __( 'Controls', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'style', [ 'label' => esc_html__( 'Select Style', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'options' => [ '1' => esc_html__( 'Style One', 'tryo-toolkit' ), '2' => esc_html__( 'Style Two', 'tryo-toolkit' ), ], 'default' => '1', ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Apply for an Account in Minutes', 'tryo-toolkit'), ] ); $this->add_control( 'content', [ 'label' => __( 'Short Description', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Get your Tryo account today!', 'tryo-toolkit'), ] ); $this->add_control( 'button_text', [ 'label' => __( 'Button Text', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Get Your Tryo Account', 'tryo-toolkit'), ] ); $this->add_control( 'button_link', [ 'label' => __( 'Button Link', 'tryo-toolkit' ), 'type' => Controls_Manager::URL, ] ); $this->end_controls_section(); $this->start_controls_section( 'section_style', [ 'label' => __( 'Style', 'tryo-toolkit' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'background', 'label' => __( 'Background', 'tryo-toolkit' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .get-started-area, .account-create-area', 'condition' => [ 'style' => '2', ] ] ); $this->add_control( 'title_color', [ 'label' => __( 'Title Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .account-create-content h2, .get-started-title h2' => '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}} .account-create-content h2, .get-started-title h2', ] ); $this->add_control( 'content_color', [ 'label' => __( 'Description Title Color', 'tryo-toolkit' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .get-started-content p, .account-create-content 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}} .get-started-content p, .account-create-content p', ] ); $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'); ?> <?php if( $settings['style'] == '1' ): ?> <div class="account-create-area"> <div class="container account-create-content"> <div class="row"> <div class="col-lg-8"> <h2 <?php echo $this-> get_render_attribute_string('title'); ?>><?php echo esc_html( $settings['title'] ); ?></h2> <p <?php echo $this-> get_render_attribute_string('content'); ?>><?php echo esc_html( $settings['content'] ); ?></p> </div> <div class="col-lg-4"> <div class="create-account"> <?php if( $settings['button_text'] != '' ): ?> <a href="<?php echo esc_url( $settings['button_link']['url'] ); ?>" class="btn btn-primary"><?php echo esc_html( $settings['button_text'] ); ?></a> <?php endif; ?> </div> </div> </div> </div> </div> <?php endif; ?> <?php if( $settings['style'] == '2' ): ?> <div class="get-started-area ptb-70"> <div class="container"> <div class="row"> <div class="col-lg-6 col-md-12"> <div class="get-started-title"> <h2 <?php echo $this-> get_render_attribute_string('title'); ?>><?php echo esc_html( $settings['title'] ); ?></h2> <?php if( $settings['button_text'] != '' ): ?> <a href="<?php echo esc_url( $settings['button_link']['url'] ); ?>" class="btn btn-primary"><?php echo esc_html( $settings['button_text'] ); ?></a> <?php endif; ?> </div> </div> <div class="col-lg-6 col-md-12"> <div class="get-started-content"> <p <?php echo $this-> get_render_attribute_string('content'); ?>><?php echo esc_html( $settings['content'] ); ?></p> </div> </div> </div> </div> </div> <?php endif; ?> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Account );
[-] 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]