um_account_secure_fields

The Ultimate Member um account secure fields function.

Description

um_account_secure_fields( $fields, $tab_key ); 

Parameters (2)

0. $fields
The fields.
1. $tab_key
The tab key.

Usage

  1. if ( !function_exists( 'um_account_secure_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/core/um-filters-account.php'; 
  3.  
  4. // The fields. 
  5. $fields = null; 
  6.  
  7. // The tab key. 
  8. $tab_key = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = um_account_secure_fields($fields, $tab_key); 
  12.  

Defined (1)

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

/core/um-filters-account.php  
  1. function um_account_secure_fields( $fields, $tab_key ) { 
  2.  
  3. $secure = apply_filters('um_account_secure_fields__enabled', true ); 
  4.  
  5. if( ! $secure ) return $fields; 
  6.  
  7. if( ! isset( $_SESSION['um_account_fields'] ) || ! isset( $_SESSION['um_account_fields'][ $tab_key ] ) ) { 
  8.  
  9. $_SESSION['um_account_fields'][ $tab_key ] = $fields;  
  10.  
  11. update_user_meta(um_user'ID'), 'um_account_secure_fields', $_SESSION['um_account_fields'] ); 
  12.  
  13.  
  14. return $fields;