pmpro_removeUpdate

Update option to remove an update.

Description

pmpro_removeUpdate( (string) $update ); 

Parameters (1)

0. $update (string)
The update.

Usage

  1. if ( !function_exists( 'pmpro_removeUpdate' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/updates.php'; 
  3.  
  4. // The update. 
  5. $update = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pmpro_removeUpdate($update); 
  9.  

Defined (1)

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

/includes/updates.php  
  1. function pmpro_removeUpdate($update) { 
  2. $updates = get_option('pmpro_updates', array()); 
  3. $key = array_search($update, $updates); 
  4. if($key!==false) { 
  5. unset($updates[$key]); 
  6.  
  7. $updates = array_values($updates); 
  8.  
  9. update_option('pmpro_updates', $updates, 'no');