Astra_Addon_Admin_Loader::astra_get_rollback_versions( string $product = 'astra-theme' )

Get Theme Rollback versions.


Description


Parameters

$product

(string) (Optional) astra-theme|astra-addon.

Default value: 'astra-theme'


Return

(array)


Source

File: admin/core/class-astra-addon-admin-loader.php

	public static function astra_get_rollback_versions( $product = 'astra-theme' ) {
		$rollback_versions_options = array();

		if ( ASTRA_ADDON_BSF_PACKAGE ) {
			$rollback_versions = Astra_Rollback_version::get_theme_all_versions();

			if ( 'astra-addon' === $product ) {
				$product_id        = bsf_extract_product_id( ASTRA_EXT_DIR );
				$product_details   = get_brainstorm_product( $product_id );
				$installed_version = isset( $product_details['version'] ) ? $product_details['version'] : '';
				$product_versions  = BSF_Rollback_Version::bsf_get_product_versions( $product_id ); // Get Remote versions
				// Show versions above than latest install version of the product.
				$rollback_versions = BSF_Rollback_Version::sort_product_versions( $product_versions, $installed_version );
			}

			foreach ( $rollback_versions as $version ) {

				$version = array(
					'label' => $version,
					'value' => $version,
				);

				$rollback_versions_options[] = $version;
			}
		}

		return $rollback_versions_options;
	}

Changelog

Changelog
Version Description
4.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.