wpcf7_upgrade

The Contact Form 7 wpcf7 upgrade function.

Description

wpcf7_upgrade(); 

Usage

  1. if ( !function_exists( 'wpcf7_upgrade' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/settings.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_upgrade(); 
  7.  

Defined (1)

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

/settings.php  
  1. function wpcf7_upgrade() { 
  2. $old_ver = WPCF7::get_option( 'version', '0' ); 
  3. $new_ver = WPCF7_VERSION
  4.  
  5. if ( $old_ver == $new_ver ) { 
  6. return; 
  7.  
  8. do_action( 'wpcf7_upgrade', $new_ver, $old_ver ); 
  9.  
  10. WPCF7::update_option( 'version', $new_ver );