wpcf7_create_nonce

The Contact Form 7 wpcf7 create nonce function.

Description

wpcf7_create_nonce( (int) $action = -1 ); 

Parameters (1)

0. $action — Optional. (int) => -1
The action.

Usage

  1. if ( !function_exists( 'wpcf7_create_nonce' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/functions.php'; 
  3.  
  4. // The action. 
  5. $action = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpcf7_create_nonce($action); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/functions.php  
  1. function wpcf7_create_nonce( $action = -1 ) { 
  2. return substr( wp_hash( $action, 'nonce' ), -12, 10 );