[ 'disabled' => true, 'variants' => [], ], ], themeoo_get_standard_fonts(), [ '------- Google Fonts -------' => [ 'disabled' => true, 'variants' => [], ], ], themeoo_get_google_fonts() ); } return array_merge( themeoo_get_standard_fonts(), themeoo_get_google_fonts() ); } endif; if ( ! function_exists( 'themeoo_get_standard_fonts' ) ) : /** * Returns an Array of all the Available Standard Fonts * * @return array */ function themeoo_get_standard_fonts() { return apply_filters( 'themeoo_get_standard_fonts', [ __( 'Default', 'ayyash' ) => [ 'variants' => [ '100', '200', '300', 'regular', '500', '600', '700', '800', '900', ], ], 'Serif' => [ 'variants' => [ 'regular' ] ], 'Sans Serif' => [ 'variants' => [ 'regular' ] ], 'Monospaced' => [ 'variants' => [ 'regular' ] ], ] ); } endif; if ( ! function_exists( 'themeoo_get_google_fonts' ) ) : /** * Returns an Array of all the Available Google Fonts * * @return array */ function themeoo_get_google_fonts() { static $fonts; if ( null === $fonts ) { $fonts = file_get_contents( THEMEOO_THEME_DIR . 'assets/fonts.json' ); /** @define "THEMEOO_THEME_DIR" "./../../" */ $fonts = file_get_contents( THEMEOO_THEME_DIR . 'assets/fonts.json' ); if ( $fonts ) { $fonts = json_decode( $fonts, true ); } } return $fonts ? $fonts : []; } endif;