Astra_Addon_Background_Updater::install_actions()
Install actions when a update button is clicked within the admin area.
Description
This function is hooked into admin_init to affect admin and wp to affect the frontend.
Return
(void)
Source
File: classes/class-astra-addon-background-updater.php
public function install_actions() {
if ( true === $this->is_new_install() ) {
self::update_db_version();
return;
}
$customizer_options = get_option( 'astra-settings' );
$fallback = $this->test_cron();
$db_migrated = $this->check_if_data_migrated();
$is_queue_running = ( isset( $customizer_options['is_astra_addon_queue_running'] ) && '' !== $customizer_options['is_astra_addon_queue_running'] ) ? $customizer_options['is_astra_addon_queue_running'] : false;
$fallback = ( $db_migrated ) ? $db_migrated : $fallback;
if ( $this->needs_db_update() && ! $is_queue_running ) {
$this->update( $fallback );
} else {
if ( ! $is_queue_running ) {
self::update_db_version();
}
}
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 2.1.3 | Introduced. |