wppaste
WordPress

TwentyTwenty_Non_Latin_Languages

Since
Twenty Twenty 1.0
Source
wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php:18
Language handling.

Compatibility

WordPress
since Twenty Twenty 1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 2

Every hook that fires from inside TwentyTwenty_Non_Latin_Languages, in the order it appears in the class, grouped by the method that fires it.

Methods · 1

Source code

	class TwentyTwenty_Non_Latin_Languages { 		/**		 * Gets custom CSS.		 *		 * Returns CSS for non-latin language, if available, or null.		 *		 * @since Twenty Twenty 1.0		 *		 * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor".		 * @return string|null Custom CSS, or null if not applicable.		 */		public static function get_non_latin_css( $type = 'front-end' ) { 			// Fetch site locale.			$locale = get_bloginfo( 'language' ); 			/**			 * Filters the fallback fonts for non-latin languages.			 *			 * @since Twenty Twenty 1.0			 *			 * @param array $font_family An array of locales and font families.			 */			$font_family = apply_filters(				'twentytwenty_get_localized_font_family_types',				array( 					// Arabic.					'ar'    => array( 'Tahoma', 'Arial', 'sans-serif' ),					'ary'   => array( 'Tahoma', 'Arial', 'sans-serif' ),					'azb'   => array( 'Tahoma', 'Arial', 'sans-serif' ),					'ckb'   => array( 'Tahoma', 'Arial', 'sans-serif' ),					'fa-IR' => array( 'Tahoma', 'Arial', 'sans-serif' ),					'haz'   => array( 'Tahoma', 'Arial', 'sans-serif' ),					'ps'    => array( 'Tahoma', 'Arial', 'sans-serif' ), 					// Chinese Simplified (China) - Noto Sans SC.					'zh-CN' => array( '\'PingFang SC\'', '\'Helvetica Neue\'', '\'Microsoft YaHei New\'', '\'STHeiti Light\'', 'sans-serif' ), 					// Chinese Traditional (Taiwan) - Noto Sans TC.					'zh-TW' => array( '\'PingFang TC\'', '\'Helvetica Neue\'', '\'Microsoft YaHei New\'', '\'STHeiti Light\'', 'sans-serif' ), 					// Chinese (Hong Kong) - Noto Sans HK.					'zh-HK' => array( '\'PingFang HK\'', '\'Helvetica Neue\'', '\'Microsoft YaHei New\'', '\'STHeiti Light\'', 'sans-serif' ), 					// Cyrillic.					'bel'   => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'bg-BG' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'kk'    => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'mk-MK' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'mn'    => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'ru-RU' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'sah'   => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'sr-RS' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'tt-RU' => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ),					'uk'    => array( '\'Helvetica Neue\'', 'Helvetica', '\'Segoe UI\'', 'Arial', 'sans-serif' ), 					// Devanagari.					'bn-BD' => array( 'Arial', 'sans-serif' ),					'hi-IN' => array( 'Arial', 'sans-serif' ),					'mr'    => array( 'Arial', 'sans-serif' ),					'ne-NP' => array( 'Arial', 'sans-serif' ), 					// Greek.					'el'    => array( '\'Helvetica Neue\', Helvetica, Arial, sans-serif' ), 					// Gujarati.					'gu'    => array( 'Arial', 'sans-serif' ), 					// Hebrew.					'he-IL' => array( '\'Arial Hebrew\'', 'Arial', 'sans-serif' ), 					// Japanese.					'ja'    => array( 'sans-serif' ), 					// Korean.					'ko-KR' => array( '\'Apple SD Gothic Neo\'', '\'Malgun Gothic\'', '\'Nanum Gothic\'', 'Dotum', 'sans-serif' ), 					// Thai.

Changelog

Introduced in Twenty Twenty 1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.