pods_validate_key

Validate form key - INTERNAL USE.

Description

pods_validate_key( $token, $datatype, $uri_hash, (constant) $columns = null, (int) $form_count = 1 ); 

Parameters (5)

0. $token
The token.
1. $datatype
The datatype.
2. $uri_hash
The uri hash.
3. $columns — Optional. (constant) => null
The columns.
4. $form_count — Optional. (int) => 1
The form count.

Usage

  1. if ( !function_exists( 'pods_validate_key' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/deprecated/deprecated.php'; 
  3.  
  4. // The token. 
  5. $token = null; 
  6.  
  7. // The datatype. 
  8. $datatype = null; 
  9.  
  10. // The uri hash. 
  11. $uri_hash = null; 
  12.  
  13. // The columns. 
  14. $columns = null; 
  15.  
  16. // The form count. 
  17. $form_count = 1; 
  18.  
  19. // NOTICE! Understand what this does before running. 
  20. $result = pods_validate_key($token, $datatype, $uri_hash, $columns, $form_count); 
  21.  

Defined (1)

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

/deprecated/deprecated.php  
  1. function pods_validate_key( $token, $datatype, $uri_hash, $columns = null, $form_count = 1 ) { 
  2. if ( null === $columns && !empty( $_SESSION ) && isset( $_SESSION[ 'pods_form_' . $token ] ) ) 
  3. $columns = $_SESSION[ 'pods_form_' . $token ]; 
  4. $success = false; 
  5. if ( false !== wp_verify_nonce( $token, 'pods-form-' . $datatype . '-' . (int) $form_count . '-' . $uri_hash . '-' . json_encode( $columns ) ) ) 
  6. $success = $columns; 
  7. return apply_filters( 'pods_validate_key', $success, $token, $datatype, $uri_hash, $columns, (int) $form_count );