Astra_Theme_Update::v_1_2_7()

Update Google Fonts value with font categories


Description

Google Font Update


Source

File: inc/theme-update/class-astra-theme-update.php

		public static function v_1_2_7() {

			$astra_options = get_option( ASTRA_THEME_SETTINGS, array() );
			$google_fonts  = Astra_Font_Families::get_google_fonts();

			foreach ( $astra_options as $key => $value ) {

				if ( ! is_array( $value ) && ! empty( $value ) && ! is_bool( $value ) ) {

					if ( array_key_exists( $value, $google_fonts ) ) {
						$astra_options[ $key ] = "'" . $value . "', " . $google_fonts[ $value ][1];
					}
				}
			}

			update_option( ASTRA_THEME_SETTINGS, $astra_options );
		}

Changelog

Changelog
Version Description
1.2.7 Introduced.

User Contributed Notes

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