astra_header_builder_migration()

Header Footer builder – Migration of options.


Description


Return

(void)


Source

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

function astra_header_builder_migration() {

	/**
	 * All theme options.
	 */
	$theme_options = get_option( 'astra-settings', array() );

	// WordPress sidebar_widgets option.
	$widget_options = get_option( 'sidebars_widgets', array() );

	$used_elements = array();

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

	$options = astra_primary_header_builder_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$options = astra_below_header_builder_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$options = astra_above_header_builder_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$options = astra_footer_builder_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$options = astra_footer_widgets_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$options = astra_primary_menu_builder_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$options = astra_sticky_header_builder_migration( $options['theme_options'], $options['used_elements'], $options['widget_options'] );

	$theme_options  = $options['theme_options'];
	$widget_options = $options['widget_options'];

	$theme_options['v3-option-migration'] = true;

	update_option( 'astra-settings', $theme_options );
	update_option( 'sidebars_widgets', $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.