PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php /** * Sign In Widget */ namespace Elementor; class Tryo_Signin extends Widget_Base { public function get_name() { return 'Signin'; } public function get_title() { return __( 'Signin', '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( 'image', [ 'label' => __( 'Image', 'tryo-toolkit' ), 'type' => Controls_Manager::MEDIA, ] ); $this->add_control( 'title', [ 'label' => __( 'Title', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Welcome back', 'tryo-toolkit'), ] ); $this->add_control( 'question_text', [ 'label' => __( 'Question Text', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('New to Tryo?', 'tryo-toolkit'), ] ); $this->add_control( 'button_text', [ 'label' => __( 'Button Text', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Sign up', 'tryo-toolkit'), ] ); $this->add_control( 'link_type', [ 'label' => __( 'Link Type', 'tryo-toolkit' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'options' => [ '1' => __( 'Link To Page', 'tryo-toolkit' ), '2' => __( 'External Link', 'tryo-toolkit' ), ], ] ); $this->add_control( 'link_to_page', [ 'label' => __( '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( 'external_link', [ 'label' => __('External Link', 'tryo-toolkit'), 'type' => Controls_Manager:: TEXT, 'condition' => [ 'link_type' => '2', ] ] ); $this->add_control( 'user_placeholder', [ 'label' => __( 'User Placeholder', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Username/Email', 'tryo-toolkit'), ] ); $this->add_control( 'pass_placeholder', [ 'label' => __( 'Password Placeholder', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Password', 'tryo-toolkit'), ] ); $this->add_control( 'login_button_text', [ 'label' => __( 'Login Button Text', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXT, 'default' => __('Login', 'tryo-toolkit'), ] ); $this->add_control( 'terms_content', [ 'label' => __( 'Content', 'tryo-toolkit' ), 'type' => Controls_Manager::TEXTAREA, ] ); $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; if ( is_user_logged_in() ) { wp_redirect( home_url( '/' ) ); exit(); //echo "<script>window.open('".site_url()."','_self')</script>"; } // Button link $link_source = ''; if ( $settings['link_type'] == 1 ) : $link_source = get_page_link($settings['link_to_page']); else : $link_source = $settings['external_link']; endif; $error = ''; $success = ''; global $wpdb, $PasswordHash, $current_user, $user_ID; ?> <section class="login-area"> <div class="row m-0"> <div class="col-lg-6 col-md-12 p-0"> <div class="login-image" style="background-image:url( <?php echo esc_url( $settings['image']['url'] ); ?> );"> <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__('image', 'tryo-toolkit' ); ?>"> </div> </div> <div class="col-lg-6 col-md-12 p-0"> <div class="login-content"> <div class="d-table"> <div class="d-table-cell"> <div class="login-form"> <div class="logo"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> <?php tryo_sticky_logo(); ?> </a> </div> <h3><?php echo esc_html( $settings['title'] ); ?></h3> <p><?php echo esc_html( $settings['question_text'] ); ?> <?php if ( $settings['button_text'] != '' ) : ?> <a href="<?php echo esc_url( $link_source ); ?>"> <?php echo esc_html( $settings['button_text'] ); ?> </a> <?php endif; ?> </p> <form method="post" autocomplete="off"> <div class="form-group"> <input type="text" name="log" placeholder="<?php echo esc_attr( $settings['user_placeholder'] ); ?>" class="form-control" required="required"> </div> <div class="form-group"> <input type="password" name="pwd" placeholder="<?php echo esc_attr( $settings['pass_placeholder'] ); ?>" class="form-control" required="required"> </div> <div class="form-group"> <div class="form-checkbox"> <label><input type="checkbox" name="terms_check" class="check-class" value="Option 1" required="required"><?php echo wp_kses_post($settings['terms_content'],'tryo') ?></label> </div> </div> <input type="hidden" name="action" value="my_login_action" /> <button type="submit" name="submit" class="btn btn-primary"><?php echo esc_html( $settings['login_button_text'] ); ?></button> </form> </div> </div> </div> </div> </div> </div> </section> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new Tryo_Signin );
[-] 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]