astra_primary_menu_builder_migration( array $theme_options, array $used_elements, array $widget_options )

Header Footer builder – Migration of Primary Menu.


Description


Parameters

$theme_options

(array) (Required) Theme options.

$used_elements

(array) (Required) Used Elements array.

$widget_options

(array) (Required) Widget options.


Return

(array)


Source

File: inc/theme-update/astra-builder-migration-updater.php

function astra_primary_menu_builder_migration( $theme_options, $used_elements, $widget_options ) {

	/**
	 * Primary Menu.
	 */
	if ( isset( $theme_options['header-main-submenu-container-animation'] ) ) {
		$theme_options['header-menu1-submenu-container-animation'] = $theme_options['header-main-submenu-container-animation'];
	}
	if ( isset( $theme_options['primary-submenu-border'] ) ) {
		$theme_options['header-menu1-submenu-border'] = $theme_options['primary-submenu-border'];
	}
	if ( isset( $theme_options['primary-submenu-b-color'] ) ) {
		$theme_options['header-menu1-submenu-b-color'] = $theme_options['primary-submenu-b-color'];
	}
	if ( isset( $theme_options['primary-submenu-item-border'] ) ) {
		$theme_options['header-menu1-submenu-item-border'] = $theme_options['primary-submenu-item-border'];
	}
	if ( isset( $theme_options['primary-submenu-item-b-color'] ) ) {
		$theme_options['header-menu1-submenu-item-b-color'] = $theme_options['primary-submenu-item-b-color'];
	}

	/**
	 * Primary Menu.
	 */

	if ( isset( $theme_options['primary-menu-color-responsive'] ) ) {
		$theme_options['header-menu1-color-responsive'] = $theme_options['primary-menu-color-responsive'];
	}

	if ( isset( $theme_options['primary-menu-bg-obj-responsive'] ) ) {
		$theme_options['header-menu1-bg-obj-responsive'] = $theme_options['primary-menu-bg-obj-responsive'];
	}


	if ( isset( $theme_options['primary-menu-text-h-color-responsive'] ) ) {
		$theme_options['header-menu1-h-color-responsive'] = $theme_options['primary-menu-text-h-color-responsive'];
	}

	if ( isset( $theme_options['primary-menu-h-bg-color-responsive'] ) ) {
		$theme_options['header-menu1-h-bg-color-responsive'] = $theme_options['primary-menu-h-bg-color-responsive'];
	}


	if ( isset( $theme_options['primary-menu-a-color-responsive'] ) ) {
		$theme_options['header-menu1-a-color-responsive'] = $theme_options['primary-menu-a-color-responsive'];
	}

	if ( isset( $theme_options['primary-menu-a-bg-color-responsive'] ) ) {
		$theme_options['header-menu1-a-bg-color-responsive'] = $theme_options['primary-menu-a-bg-color-responsive'];
	}


	if ( isset( $theme_options['font-size-primary-menu'] ) ) {
		$theme_options['header-menu1-font-size'] = $theme_options['font-size-primary-menu'];
	}

	if ( isset( $theme_options['font-weight-primary-menu'] ) ) {
		$theme_options['header-menu1-font-weight'] = $theme_options['font-weight-primary-menu'];
	}

	if ( isset( $theme_options['line-height-primary-menu'] ) ) {
		$theme_options['header-menu1-line-height'] = $theme_options['line-height-primary-menu'];
	}

	if ( isset( $theme_options['font-family-primary-menu'] ) ) {
		$theme_options['header-menu1-font-family'] = $theme_options['font-family-primary-menu'];
	}

	if ( isset( $theme_options['text-transform-primary-menu'] ) ) {
		$theme_options['header-menu1-text-transform'] = $theme_options['text-transform-primary-menu'];
	}

	if ( isset( $theme_options['primary-menu-spacing'] ) ) {
		$theme_options['header-menu1-menu-spacing'] = $theme_options['primary-menu-spacing'];
	}

	// Primary Menu - Submenu.
	if ( isset( $theme_options['primary-submenu-color-responsive'] ) ) {
		$theme_options['header-menu1-submenu-color-responsive'] = $theme_options['primary-submenu-color-responsive'];
	}

	if ( isset( $theme_options['primary-submenu-bg-color-responsive'] ) ) {
		$theme_options['header-menu1-submenu-bg-color-responsive'] = $theme_options['primary-submenu-bg-color-responsive'];
	}

	if ( isset( $theme_options['primary-submenu-h-color-responsive'] ) ) {
		$theme_options['header-menu1-submenu-h-color-responsive'] = $theme_options['primary-submenu-h-color-responsive'];
	}

	if ( isset( $theme_options['primary-submenu-h-bg-color-responsive'] ) ) {
		$theme_options['header-menu1-submenu-h-bg-color-responsive'] = $theme_options['primary-submenu-h-bg-color-responsive'];
	}

	if ( isset( $theme_options['primary-submenu-a-color-responsive'] ) ) {
		$theme_options['header-menu1-submenu-a-color-responsive'] = $theme_options['primary-submenu-a-color-responsive'];
	}

	if ( isset( $theme_options['primary-submenu-a-bg-color-responsive'] ) ) {
		$theme_options['header-menu1-submenu-a-bg-color-responsive'] = $theme_options['primary-submenu-a-bg-color-responsive'];
	}

	if ( isset( $theme_options['font-size-primary-dropdown-menu'] ) ) {
		$theme_options['header-font-size-menu1-sub-menu'] = $theme_options['font-size-primary-dropdown-menu'];
	}

	if ( isset( $theme_options['font-weight-primary-dropdown-menu'] ) ) {
		$theme_options['header-font-weight-menu1-sub-menu'] = $theme_options['font-weight-primary-dropdown-menu'];
	}

	if ( isset( $theme_options['line-height-primary-dropdown-menu'] ) ) {
		$theme_options['header-line-height-menu1-sub-menu'] = $theme_options['line-height-primary-dropdown-menu'];
	}

	if ( isset( $theme_options['font-family-primary-dropdown-menu'] ) ) {
		$theme_options['header-font-family-menu1-sub-menu'] = $theme_options['font-family-primary-dropdown-menu'];
	}

	if ( isset( $theme_options['text-transform-primary-dropdown-menu'] ) ) {
		$theme_options['header-text-transform-menu1-sub-menu'] = $theme_options['text-transform-primary-dropdown-menu'];
	}

	if ( isset( $theme_options['primary-submenu-spacing'] ) ) {
		$theme_options['header-menu1-submenu-spacing'] = $theme_options['primary-submenu-spacing'];
	}

	// Primary Menu - Mega Menu.
	if ( isset( $theme_options['primary-header-megamenu-heading-color'] ) ) {
		$theme_options['header-menu1-header-megamenu-heading-color'] = $theme_options['primary-header-megamenu-heading-color'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-h-color'] ) ) {
		$theme_options['header-menu1-header-megamenu-heading-h-color'] = $theme_options['primary-header-megamenu-heading-h-color'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-font-size'] ) ) {
		$theme_options['header-menu1-megamenu-heading-font-size'] = $theme_options['primary-header-megamenu-heading-font-size'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-font-weight'] ) ) {
		$theme_options['header-menu1-megamenu-heading-font-weight'] = $theme_options['primary-header-megamenu-heading-font-weight'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-line-height'] ) ) {
		$theme_options['header-menu1-megamenu-heading-line-height'] = $theme_options['primary-header-megamenu-heading-line-height'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-font-family'] ) ) {
		$theme_options['header-menu1-megamenu-heading-font-family'] = $theme_options['primary-header-megamenu-heading-font-family'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-text-transform'] ) ) {
		$theme_options['header-menu1-megamenu-heading-text-transform'] = $theme_options['primary-header-megamenu-heading-text-transform'];
	}

	if ( isset( $theme_options['primary-header-megamenu-heading-space'] ) ) {
		$theme_options['header-menu1-megamenu-heading-space'] = $theme_options['primary-header-megamenu-heading-space'];
	}


	/**
	 * Primary Menu - Mobile.
	 */
	if ( isset( $theme_options['header-main-menu-label'] ) ) {
		$theme_options['mobile-header-menu-label'] = $theme_options['header-main-menu-label'];
	}

	if ( isset( $theme_options['mobile-header-toggle-btn-style-color'] ) ) {
		$theme_options['mobile-header-toggle-btn-color']    = $theme_options['mobile-header-toggle-btn-style-color'];
		$theme_options['mobile-header-toggle-border-color'] = $theme_options['mobile-header-toggle-btn-style-color'];
	}

	if ( isset( $theme_options['mobile-header-toggle-btn-border-radius'] ) ) {
		$theme_options['mobile-header-toggle-border-radius'] = $theme_options['mobile-header-toggle-btn-border-radius'];
	}

	return array(
		'theme_options'  => $theme_options,
		'used_elements'  => $used_elements,
		'widget_options' => $widget_options,
	);
}

Changelog

Changelog
Version Description
3.0.0 Introduced.


User Contributed Notes

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