PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
widgets
<?php namespace Elementor; class ProfileForm extends Widget_Base{ public function get_name(){ return "profile-form"; } public function get_title(){ return "Profile Form"; } public function get_icon(){ return "eicon-form-horizontal"; } public function get_categories(){ return ['tryo-elements']; } protected function _register_controls(){ // Start FAQ Contact Controls $this-> start_controls_section( 'top_content', [ 'label'=>esc_html__('Contact Content', 'tryo-toolkit'), 'tab'=> Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'userfname', [ 'label' => __( 'User First Name', 'tryo-toolkit' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'default' => __('First Name', 'tryo-toolkit'), ] ); $this->add_control( 'userlname', [ 'label' => __( 'User Last Name', 'tryo-toolkit' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'default' => __('Last Name', 'tryo-toolkit'), ] ); $this->add_control( 'usernname', [ 'label' => __( 'User Nicename', 'tryo-toolkit' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'default' => __('Nicename', 'tryo-toolkit'), ] ); $this->add_control( 'userphnnum', [ 'label' => __( 'User Phone Number', 'tryo-toolkit' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'default' => __('Phone Number', 'tryo-toolkit'), ] ); $this->add_control( 'useremail', [ 'label' => __( 'User Email', 'tryo-toolkit' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'default' => __('Email', 'tryo-toolkit'), ] ); $this->add_control( 'useraccnum', [ 'label' => __( 'User Account Number', 'tryo-toolkit' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'default' => __('Account Number', 'tryo-toolkit'), ] ); $this-> end_controls_section(); // End Contact Controls // Start Contact Style $this-> start_controls_section( 'contact_style', [ 'label'=>esc_html__('Content', 'tryo-toolkit'), 'tab'=> Controls_Manager::TAB_STYLE, ] ); $this-> end_controls_section(); } // Register control section end here protected function render() { $settings = $this->get_settings_for_display(); if ( is_user_logged_in() ) { //echo "<script>window.open('".site_url()."','_self')</script>"; } else { wp_redirect( home_url( '/' ) ); exit(); } $error = ''; $success = ''; global $wpdb, $PasswordHash, $current_user, $user_ID, $current_user; if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $current_email = $current_user->user_email; $current_nicename = $current_user->user_nicename; $current_accnum = get_user_meta( $current_user->ID, 'acc_number' , true ); $current_fname = get_user_meta( $current_user->ID, 'first_name' , true ); $current_lname = get_user_meta( $current_user->ID, 'last_name' , true ); $current_phone = get_user_meta( $current_user->ID, 'phone_number' , true ); } else { $current_email = ''; $current_nicename = ''; $current_accnum = ''; $current_fname = ''; $current_lname = ''; $current_phone = ''; $warning_info = esc_html__('You have to login','tryo-toolkit'); } ?> <div class="profile-section ptb-70"> <div class="container"> <div class="row"> <div class="col-lg-12 col-md-12"> <div class="current-user-table"> <div class="table-responsive"> <table id="outbreakTable" class="table table-striped table-bordered"> <thead> <tr> <th><?php echo esc_html( $settings['userfname'] ); ?></th> <th><?php echo esc_html( $settings['userlname'] ); ?></th> <th><?php echo esc_html( $settings['usernname'] ); ?></th> <th><?php echo esc_html( $settings['userphnnum'] ); ?></th> <th><?php echo esc_html( $settings['useremail'] ); ?></th> <th><?php echo esc_html( $settings['useraccnum'] ); ?></th> </tr> </thead> <tbody> <tr> <td><?php echo esc_html( $current_fname ); ?></td> <td><?php echo esc_html( $current_lname ); ?></td> <td><?php echo esc_html( $current_nicename ); ?></td> <td><?php echo esc_html( $current_phone ); ?></td> <td><?php echo esc_html( $current_email ); ?></td> <td><?php echo esc_html( $current_accnum ); ?></td> </tr> </tbody> </table> </div> </div> <?php if ( is_user_logged_in() ) {} else { ?> <h2> <?php echo esc_html($warning_info);?> </h2> <?php } ?> </div> </div> </div> </div> <?php } protected function _content_template() {} } Plugin::instance()->widgets_manager->register_widget_type( new ProfileForm );
[-] 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]