pmpro_addUpdate

Update option to require an update.

Description

pmpro_addUpdate( (string) $update ); 

Parameters (1)

0. $update (string)
The update.

Usage

  1. if ( !function_exists( 'pmpro_addUpdate' ) ) { 
  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_addUpdate($update); 
  9.  

Defined (1)

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

/includes/updates.php  
  1. function pmpro_addUpdate($update) { 
  2. $updates = get_option('pmpro_updates', array()); 
  3. $updates[] = $update; 
  4. $updates = array_values(array_unique($updates)); 
  5.  
  6. update_option('pmpro_updates', $updates, 'no');