nf_clear_old_favs

Clearing out the old email favourite field and replacing it with the new version.

Description

nf_clear_old_favs(); 

Usage

  1. if ( !function_exists( 'nf_clear_old_favs' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/upgrades/upgrade-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = nf_clear_old_favs(); 
  7.  

Defined (1)

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

/deprecated/includes/admin/upgrades/upgrade-functions.php  
  1. function nf_clear_old_favs() { 
  2. global $wpdb; 
  3.  
  4. $email_fav_updated = get_option( 'nf_email_fav_updated', false ); 
  5.  
  6. if ( $email_fav_updated ) 
  7. return false; 
  8.  
  9.  
  10. update_option( 'nf_email_fav_updated', true );