recovery_mode_cookie_length

recovery_mode_cookie_length

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('recovery_mode_cookie_length') is found 2 times:

  • /wp-includes/class-wp-recovery-mode-cookie-service.php line 46
    		 * @since 5.2.0
    		 *
    		 * @param int $length Length in seconds.
    		 */
    		$length = apply_filters( 'recovery_mode_cookie_length', WEEK_IN_SECONDS );
    
    		$expire = time() + $length;
    
    		setcookie( RECOVERY_MODE_COOKIE, $value, $expire, COOKIEPATH, COOKIE_DOMAIN, is_ssl(), true );
    
    		if ( COOKIEPATH !== SITECOOKIEPATH ) {
    
  • /wp-includes/class-wp-recovery-mode-cookie-service.php line 99
    			return new WP_Error( 'invalid_created_at', __( 'Invalid cookie format.' ) );
    		}
    
    		/** This filter is documented in wp-includes/class-wp-recovery-mode-cookie-service.php */
    		$length = apply_filters( 'recovery_mode_cookie_length', WEEK_IN_SECONDS );
    
    		if ( time() > $created_at + $length ) {
    			return new WP_Error( 'expired', __( 'Cookie expired.' ) );
    		}
    
    		$to_sign = sprintf( 'recovery_mode|%s|%s', $created_at, $random );