Astra_Fonts_Data::js()

Localize Fonts


Description


Source

File: inc/customizer/class-astra-fonts-data.php

		public static function js() {

			$system = wp_json_encode( Astra_Font_Families::get_system_fonts() );
			$google = wp_json_encode( Astra_Font_Families::get_google_fonts() );
			$custom = wp_json_encode( Astra_Font_Families::get_custom_fonts() );
			if ( ! empty( $custom ) ) {
				return 'var AstFontFamilies = { system: ' . $system . ', custom: ' . $custom . ', google: ' . $google . ' };';
			} else {
				return 'var AstFontFamilies = { system: ' . $system . ', google: ' . $google . ' };';
			}
		}


User Contributed Notes

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