[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/ -> wp-login.php (source)

   1  <?php
   2  /**
   3   * WordPress User Page
   4   *
   5   * Handles authentication, registering, resetting passwords, forgot password,
   6   * and other user handling.
   7   *
   8   * @package WordPress
   9   */
  10  
  11  /** Make sure that the WordPress bootstrap has run before continuing. */
  12  require( dirname( __FILE__ ) . '/wp-load.php' );
  13  
  14  // Redirect to HTTPS login if forced to use SSL.
  15  if ( force_ssl_admin() && ! is_ssl() ) {
  16      if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
  17          wp_safe_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
  18          exit();
  19      } else {
  20          wp_safe_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
  21          exit();
  22      }
  23  }
  24  
  25  /**
  26   * Output the login page header.
  27   *
  28   * @since 2.1.0
  29   *
  30   * @param string   $title    Optional. WordPress login Page title to display in the `<title>` element.
  31   *                           Default 'Log In'.
  32   * @param string   $message  Optional. Message to display in header. Default empty.
  33   * @param WP_Error $wp_error Optional. The error to pass. Default is a WP_Error instance.
  34   */
  35  function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
  36      global $error, $interim_login, $action;
  37  
  38      // Don't index any of these forms
  39      add_action( 'login_head', 'wp_sensitive_page_meta' );
  40  
  41      add_action( 'login_head', 'wp_login_viewport_meta' );
  42  
  43      if ( ! is_wp_error( $wp_error ) ) {
  44          $wp_error = new WP_Error();
  45      }
  46  
  47      // Shake it!
  48      $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
  49      /**
  50       * Filters the error codes array for shaking the login form.
  51       *
  52       * @since 3.0.0
  53       *
  54       * @param array $shake_error_codes Error codes that shake the login form.
  55       */
  56      $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
  57  
  58      if ( $shake_error_codes && $wp_error->has_errors() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) {
  59          add_action( 'login_head', 'wp_shake_js', 12 );
  60      }
  61  
  62      $login_title = get_bloginfo( 'name', 'display' );
  63  
  64      /* translators: Login screen title. 1: Login screen name, 2: Network or site name */
  65      $login_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $login_title );
  66  
  67      /**
  68       * Filters the title tag content for login page.
  69       *
  70       * @since 4.9.0
  71       *
  72       * @param string $login_title The page title, with extra context added.
  73       * @param string $title       The original page title.
  74       */
  75      $login_title = apply_filters( 'login_title', $login_title, $title );
  76  
  77      ?><!DOCTYPE html>
  78      <!--[if IE 8]>
  79          <html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
  80      <![endif]-->
  81      <!--[if !(IE 8) ]><!-->
  82          <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  83      <!--<![endif]-->
  84      <head>
  85      <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
  86      <title><?php echo $login_title; ?></title>
  87      <?php
  88  
  89      wp_enqueue_style( 'login' );
  90  
  91      /*
  92       * Remove all stored post data on logging out.
  93       * This could be added by add_action('login_head'...) like wp_shake_js(),
  94       * but maybe better if it's not removable by plugins.
  95       */
  96      if ( 'loggedout' == $wp_error->get_error_code() ) {
  97          ?>
  98          <script>if("sessionStorage" in window){try{for(var key in sessionStorage){if(key.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(key)}}}catch(e){}};</script>
  99          <?php
 100      }
 101  
 102      /**
 103       * Enqueue scripts and styles for the login page.
 104       *
 105       * @since 3.1.0
 106       */
 107      do_action( 'login_enqueue_scripts' );
 108  
 109      /**
 110       * Fires in the login page header after scripts are enqueued.
 111       *
 112       * @since 2.1.0
 113       */
 114      do_action( 'login_head' );
 115  
 116      if ( is_multisite() ) {
 117          $login_header_url   = network_home_url();
 118          $login_header_title = get_network()->site_name;
 119      } else {
 120          $login_header_url   = __( 'https://wordpress.org/' );
 121          $login_header_title = __( 'Powered by WordPress' );
 122      }
 123  
 124      /**
 125       * Filters link URL of the header logo above login form.
 126       *
 127       * @since 2.1.0
 128       *
 129       * @param string $login_header_url Login header logo URL.
 130       */
 131      $login_header_url = apply_filters( 'login_headerurl', $login_header_url );
 132  
 133      /**
 134       * Filters the title attribute of the header logo above login form.
 135       *
 136       * @since 2.1.0
 137       *
 138       * @param string $login_header_title Login header logo title attribute.
 139       */
 140      $login_header_title = apply_filters( 'login_headertitle', $login_header_title );
 141  
 142      /*
 143       * To match the URL/title set above, Multisite sites have the blog name,
 144       * while single sites get the header title.
 145       */
 146      if ( is_multisite() ) {
 147          $login_header_text = get_bloginfo( 'name', 'display' );
 148      } else {
 149          $login_header_text = $login_header_title;
 150      }
 151  
 152      $classes = array( 'login-action-' . $action, 'wp-core-ui' );
 153      if ( is_rtl() ) {
 154          $classes[] = 'rtl';
 155      }
 156      if ( $interim_login ) {
 157          $classes[] = 'interim-login';
 158          ?>
 159          <style type="text/css">html{background-color: transparent;}</style>
 160          <?php
 161  
 162          if ( 'success' === $interim_login ) {
 163              $classes[] = 'interim-login-success';
 164          }
 165      }
 166      $classes[] = ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
 167  
 168      /**
 169       * Filters the login page body classes.
 170       *
 171       * @since 3.5.0
 172       *
 173       * @param array  $classes An array of body classes.
 174       * @param string $action  The action that brought the visitor to the login page.
 175       */
 176      $classes = apply_filters( 'login_body_class', $classes, $action );
 177  
 178      ?>
 179      </head>
 180      <body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
 181      <?php
 182      /**
 183       * Fires in the login page header after the body tag is opened.
 184       *
 185       * @since 4.6.0
 186       */
 187      do_action( 'login_header' );
 188      ?>
 189      <div id="login">
 190          <h1><a href="<?php echo esc_url( $login_header_url ); ?>" title="<?php echo esc_attr( $login_header_title ); ?>" tabindex="-1"><?php echo $login_header_text; ?></a></h1>
 191      <?php
 192  
 193      unset( $login_header_url, $login_header_title );
 194  
 195      /**
 196       * Filters the message to display above the login form.
 197       *
 198       * @since 2.1.0
 199       *
 200       * @param string $message Login message text.
 201       */
 202      $message = apply_filters( 'login_message', $message );
 203      if ( ! empty( $message ) ) {
 204          echo $message . "\n";
 205      }
 206  
 207      // In case a plugin uses $error rather than the $wp_errors object.
 208      if ( ! empty( $error ) ) {
 209          $wp_error->add( 'error', $error );
 210          unset( $error );
 211      }
 212  
 213      if ( $wp_error->has_errors() ) {
 214          $errors   = '';
 215          $messages = '';
 216          foreach ( $wp_error->get_error_codes() as $code ) {
 217              $severity = $wp_error->get_error_data( $code );
 218              foreach ( $wp_error->get_error_messages( $code ) as $error_message ) {
 219                  if ( 'message' == $severity ) {
 220                      $messages .= '    ' . $error_message . "<br />\n";
 221                  } else {
 222                      $errors .= '    ' . $error_message . "<br />\n";
 223                  }
 224              }
 225          }
 226          if ( ! empty( $errors ) ) {
 227              /**
 228               * Filters the error messages displayed above the login form.
 229               *
 230               * @since 2.1.0
 231               *
 232               * @param string $errors Login error message.
 233               */
 234              echo '<div id="login_error">' . apply_filters( 'login_errors', $errors ) . "</div>\n";
 235          }
 236          if ( ! empty( $messages ) ) {
 237              /**
 238               * Filters instructional messages displayed above the login form.
 239               *
 240               * @since 2.5.0
 241               *
 242               * @param string $messages Login messages.
 243               */
 244              echo '<p class="message">' . apply_filters( 'login_messages', $messages ) . "</p>\n";
 245          }
 246      }
 247  } // End of login_header()
 248  
 249  /**
 250   * Outputs the footer for the login page.
 251   *
 252   * @since 3.1.0
 253   *
 254   * @param string $input_id Which input to auto-focus.
 255   */
 256  function login_footer( $input_id = '' ) {
 257      global $interim_login;
 258  
 259      // Don't allow interim logins to navigate away from the page.
 260      if ( ! $interim_login ) :
 261          ?>
 262      <p id="backtoblog"><a href="<?php echo esc_url( home_url( '/' ) ); ?>">
 263          <?php
 264          /* translators: %s: site title */
 265          printf( _x( '&larr; Back to %s', 'site' ), get_bloginfo( 'title', 'display' ) );
 266          ?>
 267      </a></p>
 268          <?php the_privacy_policy_link( '<div class="privacy-policy-page-link">', '</div>' ); ?>
 269      <?php endif; ?>
 270  
 271      </div>
 272  
 273      <?php if ( ! empty( $input_id ) ) : ?>
 274      <script type="text/javascript">
 275      try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
 276      if(typeof wpOnload=='function')wpOnload();
 277      </script>
 278      <?php endif; ?>
 279  
 280      <?php
 281      /**
 282       * Fires in the login page footer.
 283       *
 284       * @since 3.1.0
 285       */
 286      do_action( 'login_footer' );
 287      ?>
 288      <div class="clear"></div>
 289      </body>
 290      </html>
 291      <?php
 292  }
 293  
 294  /**
 295   * Outputs the Javascript to handle the form shaking.
 296   *
 297   * @since 3.0.0
 298   */
 299  function wp_shake_js() {
 300      ?>
 301  <script type="text/javascript">
 302  addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
 303  function s(id,pos){g(id).left=pos+'px';}
 304  function g(id){return document.getElementById(id).style;}
 305  function shake(id,a,d){c=a.shift();s(id,c);if(a.length>0){setTimeout(function(){shake(id,a,d);},d);}else{try{g(id).position='static';wp_attempt_focus();}catch(e){}}}
 306  addLoadEvent(function(){ var p=new Array(15,30,15,0,-15,-30,-15,0);p=p.concat(p.concat(p));var i=document.forms[0].id;g(i).position='relative';shake(i,p,20);});
 307  </script>
 308      <?php
 309  }
 310  
 311  /**
 312   * Outputs the viewport meta tag.
 313   *
 314   * @since 3.7.0
 315   */
 316  function wp_login_viewport_meta() {
 317      ?>
 318      <meta name="viewport" content="width=device-width" />
 319      <?php
 320  }
 321  
 322  /**
 323   * Handles sending password retrieval email to user.
 324   *
 325   * @since 2.5.0
 326   *
 327   * @return bool|WP_Error True: when finish. WP_Error on error
 328   */
 329  function retrieve_password() {
 330      $errors = new WP_Error();
 331  
 332      if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) {
 333          $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Enter a username or email address.' ) );
 334      } elseif ( strpos( $_POST['user_login'], '@' ) ) {
 335          $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) );
 336          if ( empty( $user_data ) ) {
 337              $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no user registered with that email address.' ) );
 338          }
 339      } else {
 340          $login     = trim( $_POST['user_login'] );
 341          $user_data = get_user_by( 'login', $login );
 342      }
 343  
 344      /**
 345       * Fires before errors are returned from a password reset request.
 346       *
 347       * @since 2.1.0
 348       * @since 4.4.0 Added the `$errors` parameter.
 349       *
 350       * @param WP_Error $errors A WP_Error object containing any errors generated
 351       *                         by using invalid credentials.
 352       */
 353      do_action( 'lostpassword_post', $errors );
 354  
 355      if ( $errors->has_errors() ) {
 356          return $errors;
 357      }
 358  
 359      if ( ! $user_data ) {
 360          $errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: Invalid username or email.' ) );
 361          return $errors;
 362      }
 363  
 364      // Redefining user_login ensures we return the right case in the email.
 365      $user_login = $user_data->user_login;
 366      $user_email = $user_data->user_email;
 367      $key        = get_password_reset_key( $user_data );
 368  
 369      if ( is_wp_error( $key ) ) {
 370          return $key;
 371      }
 372  
 373      if ( is_multisite() ) {
 374          $site_name = get_network()->site_name;
 375      } else {
 376          /*
 377           * The blogname option is escaped with esc_html on the way into the database
 378           * in sanitize_option we want to reverse this for the plain text arena of emails.
 379           */
 380          $site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
 381      }
 382  
 383      $message = __( 'Someone has requested a password reset for the following account:' ) . "\r\n\r\n";
 384      /* translators: %s: site name */
 385      $message .= sprintf( __( 'Site Name: %s' ), $site_name ) . "\r\n\r\n";
 386      /* translators: %s: user login */
 387      $message .= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
 388      $message .= __( 'If this was a mistake, just ignore this email and nothing will happen.' ) . "\r\n\r\n";
 389      $message .= __( 'To reset your password, visit the following address:' ) . "\r\n\r\n";
 390      $message .= '<' . network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user_login ), 'login' ) . ">\r\n";
 391  
 392      /* translators: Password reset email subject. %s: Site name */
 393      $title = sprintf( __( '[%s] Password Reset' ), $site_name );
 394  
 395      /**
 396       * Filters the subject of the password reset email.
 397       *
 398       * @since 2.8.0
 399       * @since 4.4.0 Added the `$user_login` and `$user_data` parameters.
 400       *
 401       * @param string  $title      Default email title.
 402       * @param string  $user_login The username for the user.
 403       * @param WP_User $user_data  WP_User object.
 404       */
 405      $title = apply_filters( 'retrieve_password_title', $title, $user_login, $user_data );
 406  
 407      /**
 408       * Filters the message body of the password reset mail.
 409       *
 410       * If the filtered message is empty, the password reset email will not be sent.
 411       *
 412       * @since 2.8.0
 413       * @since 4.1.0 Added `$user_login` and `$user_data` parameters.
 414       *
 415       * @param string  $message    Default mail message.
 416       * @param string  $key        The activation key.
 417       * @param string  $user_login The username for the user.
 418       * @param WP_User $user_data  WP_User object.
 419       */
 420      $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
 421  
 422      if ( $message && ! wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) {
 423          wp_die( __( 'The email could not be sent.' ) . "<br />\n" . __( 'Possible reason: your host may have disabled the mail() function.' ) );
 424      }
 425  
 426      return true;
 427  }
 428  
 429  //
 430  // Main.
 431  //
 432  
 433  $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'login';
 434  $errors = new WP_Error();
 435  
 436  if ( isset( $_GET['key'] ) ) {
 437      $action = 'resetpass';
 438  }
 439  
 440  // Validate action so as to default to the login screen.
 441  if ( ! in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login', 'confirmaction' ), true ) && false === has_filter( 'login_form_' . $action ) ) {
 442      $action = 'login';
 443  }
 444  
 445  nocache_headers();
 446  
 447  header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
 448  
 449  if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set
 450      if ( isset( $_SERVER['PATH_INFO'] ) && ( $_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF'] ) ) {
 451          $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
 452      }
 453  
 454      $url = dirname( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) );
 455      if ( $url != get_option( 'siteurl' ) ) {
 456          update_option( 'siteurl', $url );
 457      }
 458  }
 459  
 460  //Set a cookie now to see if they are supported by the browser.
 461  $secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) );
 462  setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure );
 463  if ( SITECOOKIEPATH != COOKIEPATH ) {
 464      setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
 465  }
 466  
 467  /**
 468   * Fires when the login form is initialized.
 469   *
 470   * @since 3.2.0
 471   */
 472  do_action( 'login_init' );
 473  
 474  /**
 475   * Fires before a specified login form action.
 476   *
 477   * The dynamic portion of the hook name, `$action`, refers to the action
 478   * that brought the visitor to the login form. Actions include 'postpass',
 479   * 'logout', 'lostpassword', etc.
 480   *
 481   * @since 2.8.0
 482   */
 483  do_action( "login_form_{$action}" );
 484  
 485  $http_post     = ( 'POST' == $_SERVER['REQUEST_METHOD'] );
 486  $interim_login = isset( $_REQUEST['interim-login'] );
 487  
 488  /**
 489   * Filters the separator used between login form navigation links.
 490   *
 491   * @since 4.9.0
 492   *
 493   * @param string $login_link_separator The separator used between login form navigation links.
 494   */
 495  $login_link_separator = apply_filters( 'login_link_separator', ' | ' );
 496  
 497  switch ( $action ) {
 498  
 499      case 'postpass':
 500          if ( ! array_key_exists( 'post_password', $_POST ) ) {
 501              wp_safe_redirect( wp_get_referer() );
 502              exit();
 503          }
 504  
 505          require_once  ABSPATH . WPINC . '/class-phpass.php';
 506          $hasher = new PasswordHash( 8, true );
 507  
 508          /**
 509           * Filters the life span of the post password cookie.
 510           *
 511           * By default, the cookie expires 10 days from creation. To turn this
 512           * into a session cookie, return 0.
 513           *
 514           * @since 3.7.0
 515           *
 516           * @param int $expires The expiry time, as passed to setcookie().
 517           */
 518          $expire  = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
 519          $referer = wp_get_referer();
 520          if ( $referer ) {
 521              $secure = ( 'https' === parse_url( $referer, PHP_URL_SCHEME ) );
 522          } else {
 523              $secure = false;
 524          }
 525          setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
 526  
 527          wp_safe_redirect( wp_get_referer() );
 528          exit();
 529  
 530      case 'logout':
 531          check_admin_referer( 'log-out' );
 532  
 533          $user = wp_get_current_user();
 534  
 535          wp_logout();
 536  
 537          if ( ! empty( $_REQUEST['redirect_to'] ) ) {
 538              $redirect_to = $requested_redirect_to = $_REQUEST['redirect_to'];
 539          } else {
 540              $redirect_to           = 'wp-login.php?loggedout=true';
 541              $requested_redirect_to = '';
 542          }
 543  
 544          /**
 545           * Filters the log out redirect URL.
 546           *
 547           * @since 4.2.0
 548           *
 549           * @param string  $redirect_to           The redirect destination URL.
 550           * @param string  $requested_redirect_to The requested redirect destination URL passed as a parameter.
 551           * @param WP_User $user                  The WP_User object for the user that's logging out.
 552           */
 553          $redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );
 554          wp_safe_redirect( $redirect_to );
 555          exit();
 556  
 557      case 'lostpassword':
 558      case 'retrievepassword':
 559          if ( $http_post ) {
 560              $errors = retrieve_password();
 561              if ( ! is_wp_error( $errors ) ) {
 562                  $redirect_to = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm';
 563                  wp_safe_redirect( $redirect_to );
 564                  exit();
 565              }
 566          }
 567  
 568          if ( isset( $_GET['error'] ) ) {
 569              if ( 'invalidkey' == $_GET['error'] ) {
 570                  $errors->add( 'invalidkey', __( 'Your password reset link appears to be invalid. Please request a new link below.' ) );
 571              } elseif ( 'expiredkey' == $_GET['error'] ) {
 572                  $errors->add( 'expiredkey', __( 'Your password reset link has expired. Please request a new link below.' ) );
 573              }
 574          }
 575  
 576          $lostpassword_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
 577          /**
 578           * Filters the URL redirected to after submitting the lostpassword/retrievepassword form.
 579           *
 580           * @since 3.0.0
 581           *
 582           * @param string $lostpassword_redirect The redirect destination URL.
 583           */
 584          $redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
 585  
 586          /**
 587           * Fires before the lost password form.
 588           *
 589           * @since 1.5.1
 590           * @since 5.0.0 Added the `$errors` parameter.
 591           *
 592           * @param WP_Error $errors A `WP_Error` object containing any errors generated by using invalid
 593           *                         credentials. Note that the error object may not contain any errors.
 594           */
 595          do_action( 'lost_password', $errors );
 596  
 597          login_header( __( 'Lost Password' ), '<p class="message">' . __( 'Please enter your username or email address. You will receive a link to create a new password via email.' ) . '</p>', $errors );
 598  
 599          $user_login = '';
 600  
 601          if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
 602              $user_login = wp_unslash( $_POST['user_login'] );
 603          }
 604  
 605          ?>
 606  
 607      <form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
 608      <p>
 609          <label for="user_login" ><?php _e( 'Username or Email Address' ); ?><br />
 610          <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /></label>
 611      </p>
 612          <?php
 613          /**
 614           * Fires inside the lostpassword form tags, before the hidden fields.
 615           *
 616           * @since 2.1.0
 617           */
 618          do_action( 'lostpassword_form' );
 619          ?>
 620          <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
 621          <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Get New Password' ); ?>" /></p>
 622      </form>
 623  
 624      <p id="nav">
 625      <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
 626          <?php
 627          if ( get_option( 'users_can_register' ) ) :
 628              $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
 629  
 630              echo esc_html( $login_link_separator );
 631  
 632              /** This filter is documented in wp-includes/general-template.php */
 633              echo apply_filters( 'register', $registration_url );
 634      endif;
 635          ?>
 636      </p>
 637  
 638          <?php
 639          login_footer( 'user_login' );
 640  
 641          break;
 642  
 643      case 'resetpass':
 644      case 'rp':
 645          list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
 646          $rp_cookie       = 'wp-resetpass-' . COOKIEHASH;
 647          if ( isset( $_GET['key'] ) ) {
 648              $value = sprintf( '%s:%s', wp_unslash( $_GET['login'] ), wp_unslash( $_GET['key'] ) );
 649              setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
 650              wp_safe_redirect( remove_query_arg( array( 'key', 'login' ) ) );
 651              exit;
 652          }
 653  
 654          if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
 655              list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
 656              $user                      = check_password_reset_key( $rp_key, $rp_login );
 657              if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) {
 658                  $user = false;
 659              }
 660          } else {
 661              $user = false;
 662          }
 663  
 664          if ( ! $user || is_wp_error( $user ) ) {
 665              setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
 666              if ( $user && $user->get_error_code() === 'expired_key' ) {
 667                  wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) );
 668              } else {
 669                  wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=invalidkey' ) );
 670              }
 671              exit;
 672          }
 673  
 674          $errors = new WP_Error();
 675  
 676          if ( isset( $_POST['pass1'] ) && $_POST['pass1'] != $_POST['pass2'] ) {
 677              $errors->add( 'password_reset_mismatch', __( 'The passwords do not match.' ) );
 678          }
 679  
 680          /**
 681           * Fires before the password reset procedure is validated.
 682           *
 683           * @since 3.5.0
 684           *
 685           * @param object           $errors WP Error object.
 686           * @param WP_User|WP_Error $user   WP_User object if the login and reset key match. WP_Error object otherwise.
 687           */
 688          do_action( 'validate_password_reset', $errors, $user );
 689  
 690          if ( ( ! $errors->has_errors() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {
 691              reset_password( $user, $_POST['pass1'] );
 692              setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
 693              login_header( __( 'Password Reset' ), '<p class="message reset-pass">' . __( 'Your password has been reset.' ) . ' <a href="' . esc_url( wp_login_url() ) . '">' . __( 'Log in' ) . '</a></p>' );
 694              login_footer();
 695              exit;
 696          }
 697  
 698          wp_enqueue_script( 'utils' );
 699          wp_enqueue_script( 'user-profile' );
 700  
 701          login_header( __( 'Reset Password' ), '<p class="message reset-pass">' . __( 'Enter your new password below.' ) . '</p>', $errors );
 702  
 703          ?>
 704      <form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off">
 705      <input type="hidden" id="user_login" value="<?php echo esc_attr( $rp_login ); ?>" autocomplete="off" />
 706  
 707      <div class="user-pass1-wrap">
 708          <p>
 709              <label for="pass1"><?php _e( 'New password' ); ?></label>
 710          </p>
 711  
 712          <div class="wp-pwd">
 713              <div class="password-input-wrapper">
 714                  <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" />
 715                  <span class="button button-secondary wp-hide-pw hide-if-no-js">
 716                      <span class="dashicons dashicons-hidden"></span>
 717                  </span>
 718              </div>
 719              <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
 720          </div>
 721          <div class="pw-weak">
 722              <label>
 723                  <input type="checkbox" name="pw_weak" class="pw-checkbox" />
 724                  <?php _e( 'Confirm use of weak password' ); ?>
 725              </label>
 726          </div>
 727      </div>
 728  
 729      <p class="user-pass2-wrap">
 730          <label for="pass2"><?php _e( 'Confirm new password' ); ?></label><br />
 731          <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
 732      </p>
 733  
 734      <p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
 735      <br class="clear" />
 736  
 737          <?php
 738          /**
 739           * Fires following the 'Strength indicator' meter in the user password reset form.
 740           *
 741           * @since 3.9.0
 742           *
 743           * @param WP_User $user User object of the user whose password is being reset.
 744           */
 745          do_action( 'resetpass_form', $user );
 746          ?>
 747      <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
 748      <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Reset Password' ); ?>" /></p>
 749      </form>
 750  
 751      <p id="nav">
 752      <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
 753          <?php
 754          if ( get_option( 'users_can_register' ) ) :
 755              $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
 756  
 757              echo esc_html( $login_link_separator );
 758  
 759              /** This filter is documented in wp-includes/general-template.php */
 760              echo apply_filters( 'register', $registration_url );
 761      endif;
 762          ?>
 763      </p>
 764  
 765          <?php
 766          login_footer( 'user_pass' );
 767  
 768          break;
 769  
 770      case 'register':
 771          if ( is_multisite() ) {
 772              /**
 773               * Filters the Multisite sign up URL.
 774               *
 775               * @since 3.0.0
 776               *
 777               * @param string $sign_up_url The sign up URL.
 778               */
 779              wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );
 780              exit;
 781          }
 782  
 783          if ( ! get_option( 'users_can_register' ) ) {
 784              wp_redirect( site_url( 'wp-login.php?registration=disabled' ) );
 785              exit();
 786          }
 787  
 788          $user_login = '';
 789          $user_email = '';
 790  
 791          if ( $http_post ) {
 792              if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) {
 793                  $user_login = $_POST['user_login'];
 794              }
 795  
 796              if ( isset( $_POST['user_email'] ) && is_string( $_POST['user_email'] ) ) {
 797                  $user_email = wp_unslash( $_POST['user_email'] );
 798              }
 799  
 800              $errors = register_new_user( $user_login, $user_email );
 801              if ( ! is_wp_error( $errors ) ) {
 802                  $redirect_to = ! empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
 803                  wp_safe_redirect( $redirect_to );
 804                  exit();
 805              }
 806          }
 807  
 808          $registration_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
 809          /**
 810           * Filters the registration redirect URL.
 811           *
 812           * @since 3.0.0
 813           *
 814           * @param string $registration_redirect The redirect destination URL.
 815           */
 816          $redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
 817          login_header( __( 'Registration Form' ), '<p class="message register">' . __( 'Register For This Site' ) . '</p>', $errors );
 818          ?>
 819      <form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
 820      <p>
 821          <label for="user_login"><?php _e( 'Username' ); ?><br />
 822          <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" /></label>
 823      </p>
 824      <p>
 825          <label for="user_email"><?php _e( 'Email' ); ?><br />
 826          <input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /></label>
 827      </p>
 828          <?php
 829          /**
 830           * Fires following the 'Email' field in the user registration form.
 831           *
 832           * @since 2.1.0
 833           */
 834          do_action( 'register_form' );
 835          ?>
 836      <p id="reg_passmail"><?php _e( 'Registration confirmation will be emailed to you.' ); ?></p>
 837      <br class="clear" />
 838      <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
 839      <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Register' ); ?>" /></p>
 840      </form>
 841  
 842      <p id="nav">
 843      <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a>
 844          <?php echo esc_html( $login_link_separator ); ?>
 845      <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
 846      </p>
 847  
 848          <?php
 849          login_footer( 'user_login' );
 850  
 851          break;
 852  
 853      case 'confirmaction':
 854          if ( ! isset( $_GET['request_id'] ) ) {
 855              wp_die( __( 'Invalid request.' ) );
 856          }
 857  
 858          $request_id = (int) $_GET['request_id'];
 859  
 860          if ( isset( $_GET['confirm_key'] ) ) {
 861              $key    = sanitize_text_field( wp_unslash( $_GET['confirm_key'] ) );
 862              $result = wp_validate_user_request_key( $request_id, $key );
 863          } else {
 864              $result = new WP_Error( 'invalid_key', __( 'Invalid key' ) );
 865          }
 866  
 867          if ( is_wp_error( $result ) ) {
 868              wp_die( $result );
 869          }
 870  
 871          /**
 872           * Fires an action hook when the account action has been confirmed by the user.
 873           *
 874           * Using this you can assume the user has agreed to perform the action by
 875           * clicking on the link in the confirmation email.
 876           *
 877           * After firing this action hook the page will redirect to wp-login a callback
 878           * redirects or exits first.
 879           *
 880           * @since 4.9.6
 881           *
 882           * @param int $request_id Request ID.
 883           */
 884          do_action( 'user_request_action_confirmed', $request_id );
 885  
 886          $message = _wp_privacy_account_request_confirmed_message( $request_id );
 887  
 888          login_header( __( 'User action confirmed.' ), $message );
 889          login_footer();
 890          exit;
 891  
 892      case 'login':
 893      default:
 894          $secure_cookie   = '';
 895          $customize_login = isset( $_REQUEST['customize-login'] );
 896          if ( $customize_login ) {
 897              wp_enqueue_script( 'customize-base' );
 898          }
 899  
 900          // If the user wants SSL but the session is not SSL, force a secure cookie.
 901          if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) {
 902              $user_name = sanitize_user( $_POST['log'] );
 903              $user      = get_user_by( 'login', $user_name );
 904  
 905              if ( ! $user && strpos( $user_name, '@' ) ) {
 906                  $user = get_user_by( 'email', $user_name );
 907              }
 908  
 909              if ( $user ) {
 910                  if ( get_user_option( 'use_ssl', $user->ID ) ) {
 911                      $secure_cookie = true;
 912                      force_ssl_admin( true );
 913                  }
 914              }
 915          }
 916  
 917          if ( isset( $_REQUEST['redirect_to'] ) ) {
 918              $redirect_to = $_REQUEST['redirect_to'];
 919              // Redirect to HTTPS if user wants SSL.
 920              if ( $secure_cookie && false !== strpos( $redirect_to, 'wp-admin' ) ) {
 921                  $redirect_to = preg_replace( '|^http://|', 'https://', $redirect_to );
 922              }
 923          } else {
 924              $redirect_to = admin_url();
 925          }
 926  
 927          $reauth = empty( $_REQUEST['reauth'] ) ? false : true;
 928  
 929          $user = wp_signon( array(), $secure_cookie );
 930  
 931          if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
 932              if ( headers_sent() ) {
 933                  $user = new WP_Error(
 934                      'test_cookie',
 935                      sprintf(
 936                          /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
 937                          __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
 938                          __( 'https://codex.wordpress.org/Cookies' ),
 939                          __( 'https://wordpress.org/support/' )
 940                      )
 941                  );
 942              } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
 943                  // If cookies are disabled we can't log in even with a valid user+pass
 944                  $user = new WP_Error(
 945                      'test_cookie',
 946                      sprintf(
 947                          /* translators: %s: Browser cookie documentation URL */
 948                          __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
 949                          __( 'https://codex.wordpress.org/Cookies' )
 950                      )
 951                  );
 952              }
 953          }
 954  
 955          $requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
 956          /**
 957           * Filters the login redirect URL.
 958           *
 959           * @since 3.0.0
 960           *
 961           * @param string           $redirect_to           The redirect destination URL.
 962           * @param string           $requested_redirect_to The requested redirect destination URL passed as a parameter.
 963           * @param WP_User|WP_Error $user                  WP_User object if login was successful, WP_Error object otherwise.
 964           */
 965          $redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user );
 966  
 967          if ( ! is_wp_error( $user ) && ! $reauth ) {
 968              if ( $interim_login ) {
 969                  $message       = '<p class="message">' . __( 'You have logged in successfully.' ) . '</p>';
 970                  $interim_login = 'success';
 971                  login_header( '', $message );
 972                  ?>
 973                  </div>
 974                  <?php
 975                  /** This action is documented in wp-login.php */
 976                  do_action( 'login_footer' );
 977                  ?>
 978                  <?php if ( $customize_login ) : ?>
 979                  <script type="text/javascript">setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
 980              <?php endif; ?>
 981                  </body></html>
 982                  <?php
 983                  exit;
 984              }
 985  
 986              if ( ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) {
 987                  // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
 988                  if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) {
 989                      $redirect_to = user_admin_url();
 990                  } elseif ( is_multisite() && ! $user->has_cap( 'read' ) ) {
 991                      $redirect_to = get_dashboard_url( $user->ID );
 992                  } elseif ( ! $user->has_cap( 'edit_posts' ) ) {
 993                      $redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url();
 994                  }
 995  
 996                  wp_redirect( $redirect_to );
 997                  exit();
 998              }
 999              wp_safe_redirect( $redirect_to );
1000              exit();
1001          }
1002  
1003          $errors = $user;
1004          // Clear errors if loggedout is set.
1005          if ( ! empty( $_GET['loggedout'] ) || $reauth ) {
1006              $errors = new WP_Error();
1007          }
1008  
1009          if ( $interim_login ) {
1010              if ( ! $errors->has_errors() ) {
1011                  $errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' );
1012              }
1013          } else {
1014              // Some parts of this script use the main login form to display a message.
1015              if ( isset( $_GET['loggedout'] ) && true == $_GET['loggedout'] ) {
1016                  $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' );
1017              } elseif ( isset( $_GET['registration'] ) && 'disabled' == $_GET['registration'] ) {
1018                  $errors->add( 'registerdisabled', __( 'User registration is currently not allowed.' ) );
1019              } elseif ( isset( $_GET['checkemail'] ) && 'confirm' == $_GET['checkemail'] ) {
1020                  $errors->add( 'confirm', __( 'Check your email for the confirmation link.' ), 'message' );
1021              } elseif ( isset( $_GET['checkemail'] ) && 'newpass' == $_GET['checkemail'] ) {
1022                  $errors->add( 'newpass', __( 'Check your email for your new password.' ), 'message' );
1023              } elseif ( isset( $_GET['checkemail'] ) && 'registered' == $_GET['checkemail'] ) {
1024                  $errors->add( 'registered', __( 'Registration complete. Please check your email.' ), 'message' );
1025              } elseif ( strpos( $redirect_to, 'about.php?updated' ) ) {
1026                  $errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what&#8217;s new.' ), 'message' );
1027              }
1028          }
1029  
1030          /**
1031           * Filters the login page errors.
1032           *
1033           * @since 3.6.0
1034           *
1035           * @param object $errors      WP Error object.
1036           * @param string $redirect_to Redirect destination URL.
1037           */
1038          $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
1039  
1040          // Clear any stale cookies.
1041          if ( $reauth ) {
1042              wp_clear_auth_cookie();
1043          }
1044  
1045          login_header( __( 'Log In' ), '', $errors );
1046  
1047          if ( isset( $_POST['log'] ) ) {
1048              $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr( wp_unslash( $_POST['log'] ) ) : '';
1049          }
1050          $rememberme = ! empty( $_POST['rememberme'] );
1051  
1052          if ( $errors->has_errors() ) {
1053              $aria_describedby_error = ' aria-describedby="login_error"';
1054          } else {
1055              $aria_describedby_error = '';
1056          }
1057          ?>
1058  
1059      <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
1060      <p>
1061          <label for="user_login"><?php _e( 'Username or Email Address' ); ?><br />
1062          <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /></label>
1063      </p>
1064      <p>
1065          <label for="user_pass"><?php _e( 'Password' ); ?><br />
1066          <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" /></label>
1067      </p>
1068          <?php
1069          /**
1070           * Fires following the 'Password' field in the login form.
1071           *
1072           * @since 2.1.0
1073           */
1074          do_action( 'login_form' );
1075          ?>
1076      <p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_html_e( 'Remember Me' ); ?></label></p>
1077      <p class="submit">
1078          <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Log In' ); ?>" />
1079          <?php    if ( $interim_login ) { ?>
1080          <input type="hidden" name="interim-login" value="1" />
1081      <?php    } else { ?>
1082          <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
1083      <?php } ?>
1084          <?php if ( $customize_login ) : ?>
1085          <input type="hidden" name="customize-login" value="1" />
1086      <?php endif; ?>
1087          <input type="hidden" name="testcookie" value="1" />
1088      </p>
1089      </form>
1090  
1091          <?php if ( ! $interim_login ) { ?>
1092      <p id="nav">
1093              <?php
1094              if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) :
1095                  if ( get_option( 'users_can_register' ) ) :
1096                      $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) );
1097  
1098                      /** This filter is documented in wp-includes/general-template.php */
1099                      echo apply_filters( 'register', $registration_url );
1100  
1101                      echo esc_html( $login_link_separator );
1102                  endif;
1103                  ?>
1104          <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a>
1105              <?php endif; ?>
1106      </p>
1107      <?php } ?>
1108  
1109      <script type="text/javascript">
1110  	function wp_attempt_focus(){
1111      setTimeout( function(){ try{
1112          <?php if ( $user_login ) { ?>
1113      d = document.getElementById('user_pass');
1114      d.value = '';
1115      <?php } else { ?>
1116      d = document.getElementById('user_login');
1117      <?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
1118      if( d.value != '' )
1119      d.value = '';
1120          <?php
1121  }
1122  }
1123  ?>
1124      d.focus();
1125      d.select();
1126      } catch(e){}
1127      }, 200);
1128      }
1129  
1130          <?php
1131          /**
1132           * Filters whether to print the call to `wp_attempt_focus()` on the login screen.
1133           *
1134           * @since 4.8.0
1135           *
1136           * @param bool $print Whether to print the function call. Default true.
1137           */
1138          if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) {
1139              ?>
1140      wp_attempt_focus();
1141          <?php } ?>
1142      if(typeof wpOnload=='function')wpOnload();
1143          <?php if ( $interim_login ) { ?>
1144      (function(){
1145      try {
1146          var i, links = document.getElementsByTagName('a');
1147          for ( i in links ) {
1148              if ( links[i].href )
1149                  links[i].target = '_blank';
1150          }
1151      } catch(e){}
1152      }());
1153      <?php } ?>
1154      </script>
1155  
1156          <?php
1157          login_footer();
1158  
1159          break;
1160  } // End action switch.


Generated: Sat Dec 15 01:00:07 2018 Cross-referenced by PHPXref 0.7.1