Astra_Fonts_Data

Fonts Data


Description


Source

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

	final class Astra_Fonts_Data {

		/**
		 * Localize Fonts
		 */
		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 . ' };';
			}
		}
	}

Methods

  • js — Localize Fonts

User Contributed Notes

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