Astra_Theme_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.
Source
File: inc/theme-update/class-astra-theme-background-updater.php
public function install_actions() { do_action( 'astra_update_initiated', self::$background_updater ); if ( true === $this->is_new_install() ) { self::update_db_version(); return; } $fallback = $this->test_cron(); $db_migrated = $this->check_if_data_migrated(); /** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $is_queue_running = astra_get_option( 'is_theme_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