This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Astra_List_Font_Families::get_all_google_fonts()

Get all available Google Fonts from Astra.


Description


Return

(array) All Google Fonts.


Source

File: inc/abilities/customizer/globals/typography/class-astra-list-font-families.php

	private function get_all_google_fonts() {
		if ( ! class_exists( 'Astra_Font_Families' ) ) {
			return $this->get_popular_fonts();
		}

		$fonts        = array();
		$google_fonts = Astra_Font_Families::get_google_fonts();

		foreach ( $google_fonts as $font_name => $font_data ) {
			$fonts[] = array(
				'name'     => $font_name,
				'category' => isset( $font_data[1] ) ? $font_data[1] : 'sans-serif',
				'variants' => isset( $font_data[0] ) ? $font_data[0] : array( '400' ),
			);
		}

		return $fonts;
	}


User Contributed Notes

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