$uid =
apply_filters( 'nonce_user_logged_out',
$uid,
$action );
} if ( empty( $nonce ) ) { return false;
} $token =
wp_get_session_token();
$i =
wp_nonce_tick( $action );
// Nonce generated 0-12 hours ago.
$expected =
substr( wp_hash( $i . '|' .
$action . '|' .
$uid . '|' .
$token, 'nonce'
), -12, 10
);
if ( hash_equals( $expected,
$nonce ) ) { return 1;
} // Nonce generated 12-24 hours ago.
$expected =
substr( wp_hash( ( $i - 1
) . '|' .
$action . '|' .
$uid . '|' .
$token, 'nonce'
), -12, 10
);
if ( hash_equals( $expected,
$nonce ) ) { return 2;
}