PUM_Upgrade_v1_7_Settings
Implements a batch processor for migrating existing popups to new data structure.
Description Description
See also See also
- PUM_Abstract_Upgrade_Popups
Warning: preg_match(): Compilation failed: invalid range in character class at offset 24 in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/formatting.php on line 207
Source Source
File: includes/batch/upgrade/class-upgrade-v1_7-settings.php
class PUM_Upgrade_v1_7_Settings extends PUM_Abstract_Upgrade_Settings { /** * Batch process ID. * * @var string */ public $batch_id = 'core-v1_7-settings'; /** * Process needed upgrades on each popup. * * @param array $settings Current global popup maker settings. */ public function process_settings( $settings = array() ) { $changed = false; // popmake_settings['newsletter_default_provider'] == '' should be changed to 'none' if ( isset( $settings['newsletter_default_provider'] ) && $settings['newsletter_default_provider'] == '' ) { $settings['newsletter_default_provider'] = 'none'; $changed = true; } /** * Save only if something changed. */ if ( $changed ) { PUM_Utils_Options::update_all( $settings ); } } }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.7.0 | Introduced. |
Methods Methods
- process_settings — Process needed upgrades on each popup.