wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
wp_generate_user_request_key › WordPress Function
Od4.9.6
Przestarzałyn/a
› wp_generate_user_request_key ( $request_id )
| Parametry: |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Returns a confirmation key for a user action and stores the hashed version for future comparison.
Źródło
function wp_generate_user_request_key( $request_id ) {
// Generate something random for a confirmation key.
$key = wp_generate_password( 20, false );
// Save the key, hashed.
wp_update_post(
array(
'ID' => $request_id,
'post_status' => 'request-pending',
'post_password' => wp_fast_hash( $key ),
)
);
return $key;
}