Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_create_nonce [ WordPress Function ]

wp_create_nonce ( $action = -1 )
Parameters:
  • (string|int) $action Scalar value to add context to the nonce.
Returns:
  • (string) The one use form token
Defined at:



Creates a random, one time use token.

Source


<?php
function wp_create_nonce($action = -1) {
    
$user wp_get_current_user();
    
$uid = (int) $user->ID;

    
$i wp_nonce_tick();

    return 
substr(wp_hash($i $action $uid'nonce'), -1210);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics