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


Generated: Sat May 26 01:00:05 2018 Cross-referenced by PHPXref 0.7.1