Astra_Addon_Update::v_1_4_0_beta_3()

Update options of older version than 1.4.0-beta.3.


Description


Source

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

		public static function v_1_4_0_beta_3() {

			// Mobile Header - Border new param introduced for Top, Right, Bottom and left border.
			$astra_options = get_option( 'astra-settings', array() );

			if ( isset( $astra_options['mobile-header-menu-border'] ) ) {
				if ( $astra_options['mobile-header-menu-border'] ) {
					$astra_options['mobile-header-menu-all-border'] = array(
						'top'    => 1,
						'right'  => '',
						'bottom' => 1,
						'left'   => '',
					);
				} else {
						$astra_options['mobile-header-menu-all-border'] = array(
							'top'    => 0,
							'right'  => 0,
							'bottom' => 0,
							'left'   => 0,
						);
				}
			}
			if ( isset( $astra_options['mobile-above-header-menu-border'] ) ) {
				if ( $astra_options['mobile-above-header-menu-border'] ) {
					$astra_options['mobile-above-header-menu-all-border'] = array(
						'top'    => 1,
						'right'  => '',
						'bottom' => 1,
						'left'   => '',
					);
				} else {
					$astra_options['mobile-above-header-menu-all-border'] = array(
						'top'    => 0,
						'right'  => 0,
						'bottom' => 0,
						'left'   => 0,
					);
				}
			}
			if ( isset( $astra_options['mobile-below-header-menu-border'] ) ) {
				if ( $astra_options['mobile-below-header-menu-border'] ) {
					$astra_options['mobile-below-header-menu-all-border'] = array(
						'top'    => 1,
						'right'  => '',
						'bottom' => 1,
						'left'   => '',
					);
				} else {
					$astra_options['mobile-below-header-menu-all-border'] = array(
						'top'    => 0,
						'right'  => 0,
						'bottom' => 0,
						'left'   => 0,
					);
				}
			}

			update_option( 'astra-settings', $astra_options );
		}

Changelog

Changelog
Version Description
1.4.0-beta.3 Introduced.

User Contributed Notes

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