This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Astra_Theme_Background_Updater::update( bool $fallback )
Push all needed DB updates to the queue for processing.
Description
Parameters
- $fallback
-
(bool) (Required) Fallback migration.
Return
(void)
Source
File: inc/theme-update/class-astra-theme-background-updater.php
private function update( $fallback ) { $current_db_version = astra_get_option( 'theme-auto-version' ); if ( count( $this->get_db_update_callbacks() ) > 0 ) { foreach ( $this->get_db_update_callbacks() as $version => $update_callbacks ) { if ( version_compare( $current_db_version, $version, '<' ) ) { foreach ( $update_callbacks as $update_callback ) { if ( $fallback ) { call_user_func( $update_callback ); } else { self::$background_updater->push_to_queue( $update_callback ); } } } } if ( $fallback ) { self::update_db_version(); } else { astra_update_option( 'is_theme_queue_running', true ); self::$background_updater->push_to_queue( 'update_db_version' ); } } else { self::$background_updater->push_to_queue( 'update_db_version' ); } self::$background_updater->save()->dispatch(); }
Expand full source code Collapse full source code View on Trac