id_base ); echo $args['before_widget']; // Output title if ( $title ) { echo '

' . $title . '

'; } $json_data = array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'logout_redirect' => $instance['logout_redirect'], 'login_redirect' => $instance['login_redirect'], ); // Output preloader echo '
'; // Output profile block $output = ''; $output .= ''; echo $output; $form_template_vars = array( 'type' => 'login hidden', 'action' => site_url( 'wp-login.php' ), 'method' => 'post', 'fields' => array( 'log' => array( 'type' => 'text', 'placeholder' => us_translate( 'Username' ), 'required' => TRUE, 'icon' => 'far|user' ), 'pwd' => array( 'type' => 'password', 'placeholder' => us_translate( 'Password' ), 'required' => TRUE, 'icon' => 'far|lock' ), 'submit' => array( 'type' => 'submit', 'title' => us_translate( 'Log In' ), 'btn_classes' => 'us-btn-style_1', ), 'rememberme' => array( 'type' => 'hidden', 'value' => 'forever', ), 'nonce' => array( 'type' => 'nonce', 'action' => 'us_ajax_login_nonce', 'name' => 'us_login_nonce', ), ), ); if ( ! empty( $instance['login_redirect'] ) ) { $form_template_vars['fields']['redirect_to'] = array( 'type' => 'hidden', 'value' => $instance['login_redirect'], ); } if ( $instance['register'] != '' OR $instance['lostpass'] != '' ) { $form_template_vars['end_html'] = ''; } // Output form fields us_load_template( 'templates/form/form', $form_template_vars ); // If we are in front end editor mode, apply JS to the widget if ( FALSE AND function_exists( 'vc_is_page_editable' ) AND vc_is_page_editable() ) { echo ''; } echo $args['after_widget']; } }