Astra_Addon_Update::init()

Implement addon update logic.


Description


Return

(void)


Source

File: classes/class-astra-addon-update.php

		public static function init() {

			do_action( 'astra_addon_update_before' );

			// Get auto saved version number.
			$saved_version = self::astra_addon_stored_version();

			// If there is no saved version in the database then return.
			if ( false === $saved_version ) {
				return;
			}

			// If equals then return.
			if ( version_compare( $saved_version, ASTRA_EXT_VER, '=' ) ) {
				return;
			}

			// Update to older version than 1.0.0-beta.6 version.
			if ( version_compare( $saved_version, '1.0.0-beta.6', '<' ) ) {
				self::v_1_0_0_beta_6();
			}

			// Update to older version than 1.0.0-beta.7 version.
			if ( version_compare( $saved_version, '1.0.0-beta.7', '<' ) ) {
				self::v_1_0_0_beta_7();
			}

			// Update to older version than 1.0.0-rc.3 version.
			if ( version_compare( $saved_version, '1.0.0-rc.3', '<' ) ) {
				self::v_1_0_0_rc_3();
			}

			// Update to older version than 1.0.0-rc.6 version.
			if ( version_compare( $saved_version, '1.0.0-rc.6', '<' ) ) {
				self::v_1_0_0_rc_6();
			}

			// Update to older version than 1.0.0-rc.7 version.
			if ( version_compare( $saved_version, '1.0.0-rc.7', '<' ) && version_compare( ASTRA_THEME_VERSION, '1.0.22', '>=' ) ) {
				self::v_1_0_0_rc_7();
			}

			// Update to older version than 1.0.0-rc.9 version.
			if ( version_compare( $saved_version, '1.0.0-rc.9', '<' ) ) {
				self::v_1_0_0_rc_9();
			}

			// Footer Widget Spacing Top/Right/Bottom/Left updated for responsive devices.
			if ( version_compare( $saved_version, '1.2.0-beta.1', '<' ) ) {
				self::v_1_2_0_beta_1();
			}
			// Site Lauout Padded layout Top/Right/Bottom/Left updated for responsive devices.
			if ( version_compare( $saved_version, '1.2.0-beta.2', '<' ) ) {
				self::v_1_2_0_beta_2();
			}
			// Update to older version than 1.2.0-beta.4 version.
			if ( version_compare( $saved_version, '1.2.0-beta.4', '<' ) ) {
				self::v_1_2_0_beta_4();
			}
			// Update to older version than 1.3.0-beta.4 version.
			if ( version_compare( $saved_version, '1.3.0-beta.4', '<' ) ) {
				self::v_1_3_0_beta_4();
			}
			// Update to older version than 1.3.0 version.
			if ( version_compare( $saved_version, '1.3.0', '<' ) ) {
				self::v_1_3_0();
			}
			// Update to older version than 1.4.0-beta.3 version.
			if ( version_compare( $saved_version, '1.4.0-beta.3', '<' ) ) {
				self::v_1_4_0_beta_3();
			}
			// Update to older version than 1.4.0-beta.4 version.
			if ( version_compare( $saved_version, '1.4.0-beta.4', '<' ) ) {
				self::v_1_4_0_beta_4();
			}

			if ( version_compare( $saved_version, '1.4.0-beta.5', '<' ) ) {
				self::v_1_4_0_beta_5();
			}

			if ( version_compare( $saved_version, '1.4.1', '<' ) ) {
				self::v_1_4_1();
			}

			if ( version_compare( $saved_version, '1.4.8', '<' ) ) {
				self::v_1_4_8();
			}

			if ( version_compare( $saved_version, '1.6.0-beta.4', '<' ) ) {
				self::v_1_6_0_beta_4();
			}

			if ( version_compare( $saved_version, '1.6.0', '<' ) ) {
				self::v_1_6_0();
			}

			if ( version_compare( $saved_version, '1.6.1', '<' ) ) {
				self::v_1_6_1();
			}

			if ( version_compare( $saved_version, '1.6.10', '<' ) ) {
				self::v_1_6_10();
			}

			if ( version_compare( $saved_version, '1.8.0-beta.1', '<' ) ) {
				self::v1_8_0();
			}

			if ( version_compare( $saved_version, '1.8.8', '<' ) ) {
				self::v1_8_8();
			}
		}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

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