wp/wp-includes/class-wp-recovery-mode-link-service.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    63 	/**
    63 	/**
    64 	 * Enters recovery mode when the user hits wp-login.php with a valid recovery mode link.
    64 	 * Enters recovery mode when the user hits wp-login.php with a valid recovery mode link.
    65 	 *
    65 	 *
    66 	 * @since 5.2.0
    66 	 * @since 5.2.0
    67 	 *
    67 	 *
       
    68 	 * @global string $pagenow
       
    69 	 *
    68 	 * @param int $ttl Number of seconds the link should be valid for.
    70 	 * @param int $ttl Number of seconds the link should be valid for.
    69 	 */
    71 	 */
    70 	public function handle_begin_link( $ttl ) {
    72 	public function handle_begin_link( $ttl ) {
    71 		if ( ! isset( $GLOBALS['pagenow'] ) || 'wp-login.php' !== $GLOBALS['pagenow'] ) {
    73 		if ( ! isset( $GLOBALS['pagenow'] ) || 'wp-login.php' !== $GLOBALS['pagenow'] ) {
    72 			return;
    74 			return;
   112 			),
   114 			),
   113 			wp_login_url()
   115 			wp_login_url()
   114 		);
   116 		);
   115 
   117 
   116 		/**
   118 		/**
   117 		 * Filter the URL to begin recovery mode.
   119 		 * Filters the URL to begin recovery mode.
   118 		 *
   120 		 *
   119 		 * @since 5.2.0
   121 		 * @since 5.2.0
   120 		 *
   122 		 *
   121 		 * @param string $url   The generated recovery mode begin URL.
   123 		 * @param string $url   The generated recovery mode begin URL.
   122 		 * @param string $token The token used to identify the key.
   124 		 * @param string $token The token used to identify the key.