Skip Navigation

Waiting for author

Topic Tags: Compatibility

Symptoms

When you are translating the admin strings(theme settings strings) in Astra theme, and you visit the translation, the original value of the string can be overwritten with the value of the translation.

Workaround

We have contacted the Astra theme developers until then you can use this workaround if you are sure about what you are doing and have a full backup of your site.

Go to: wp-content/themes/astra/inc/core/common-functions.php
Change the code from:

function astra_update_option( $option, $value ) {

		do_action( "astra_before_update_option_{$option}", $value, $option );

		// Get all customizer options.
		$theme_options = get_option( ASTRA_THEME_SETTINGS );

		// Update value in options array.
		$theme_options[ $option ] = $value;

		update_option( ASTRA_THEME_SETTINGS, $theme_options );

		do_action( "astra_after_update_option_{$option}", $value, $option );
	}

To:

function astra_update_option( $option, $value ) {

		do_action( "astra_before_update_option_{$option}", $value, $option );

		$theme_options = maybe_unserialize(apply_filters( 'wpml_unfiltered_admin_string', get_option( ASTRA_THEME_SETTINGS ), ASTRA_THEME_SETTINGS ));

		// Update value in options array.
		$theme_options[ $option ] = $value;

		update_option( ASTRA_THEME_SETTINGS, $theme_options );

		do_action( "astra_after_update_option_{$option}", $value, $option );
	}

Leave a Reply

Please leave here comments about this page only.
For technical support and feature suggestions, head to our forum. We are waiting there!

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>