gmb_set_upgrade_complete

Adds an upgrade action to the completed upgrades array.

Description

gmb_set_upgrade_complete( (string) $upgrade_action = '' ); 

Parameters (1)

0. $upgrade_action — Optional. (string) => ''
The action to add to the completed upgrades array

Usage

  1. if ( !function_exists( 'gmb_set_upgrade_complete' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'maps-builder/vendor/wordimpress/maps-builder-core/includes/admin/upgrades/upgrade-functions.php'; 
  3.  
  4. // The action to add to the completed upgrades array 
  5. $upgrade_action = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gmb_set_upgrade_complete($upgrade_action); 
  9.  

Defined (1)

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

/vendor/wordimpress/maps-builder-core/includes/admin/upgrades/upgrade-functions.php  
  1. function gmb_set_upgrade_complete( $upgrade_action = '' ) { 
  2.  
  3. if ( empty( $upgrade_action ) ) { 
  4. return false; 
  5.  
  6. $completed_upgrades = gmb_get_completed_upgrades(); 
  7. $completed_upgrades[] = $upgrade_action; 
  8.  
  9. // Remove any blanks, and only show uniques 
  10. $completed_upgrades = array_unique( array_values( $completed_upgrades ) ); 
  11.  
  12. return update_option( 'gmb_completed_upgrades', $completed_upgrades );