gmb_has_upgrade_completed

Check if the upgrade routine has been run for a specific action.

Description

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

Parameters (1)

0. $upgrade_action — Optional. (string) => ''
The upgrade action to check completion for

Usage

  1. if ( !function_exists( 'gmb_has_upgrade_completed' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'maps-builder/vendor/wordimpress/maps-builder-core/includes/admin/upgrades/upgrade-functions.php'; 
  3.  
  4. // The upgrade action to check completion for 
  5. $upgrade_action = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gmb_has_upgrade_completed($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_has_upgrade_completed( $upgrade_action = '' ) { 
  2.  
  3. if ( empty( $upgrade_action ) ) { 
  4. return false; 
  5.  
  6. $completed_upgrades = gmb_get_completed_upgrades(); 
  7.  
  8. return in_array( $upgrade_action, $completed_upgrades ); 
  9.