| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
WP_Font_Face class.
| File Size: | 379 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
WP_Font_Face:: (8 methods):
generate_and_print()
validate_fonts()
validate_font_face_declarations()
get_css()
order_src()
build_font_face_css()
compile_src()
compile_variations()
Class: WP_Font_Face - X-Ref
Font Face generates and prints `@font-face` styles for given fonts.| generate_and_print( array $fonts ) X-Ref |
| Generates and prints the `@font-face` styles for the given fonts. param: array[][] $fonts Optional. The font-families and their font variations. |
| validate_fonts( array $fonts ) X-Ref |
| Validates each of the font-face properties. param: array $fonts The fonts to valid. return: array Prepared font-faces organized by provider and font-family. |
| validate_font_face_declarations( array $font_face ) X-Ref |
| Validates each font-face declaration (property and value pairing). param: array $font_face Font face property and value pairings to validate. return: array|false Validated font-face on success, or false on failure. |
| get_css( $font_faces ) X-Ref |
| Gets the `@font-face` CSS styles for locally-hosted font files. This method does the following processing tasks: 1. Orchestrates an optimized `src` (with format) for browser support. 2. Generates the `@font-face` for all its fonts. param: array[] $font_faces The font-faces to generate @font-face CSS styles. return: string The `@font-face` CSS styles. |
| order_src( array $font_face ) X-Ref |
| Orders `src` items to optimize for browser support. param: array $font_face Font face to process. return: array Font-face with ordered src items. |
| build_font_face_css( array $font_face ) X-Ref |
| Builds the font-family's CSS. param: array $font_face Font face to process. return: string This font-family's CSS. |
| compile_src( array $value ) X-Ref |
| Compiles the `src` into valid CSS. param: array $value Value to process. return: string The CSS. |
| compile_variations( array $font_variation_settings ) X-Ref |
| Compiles the font variation settings. param: array $font_variation_settings Array of font variation settings. return: string The CSS. |
| Generated : Sat Apr 18 08:20:10 2026 | Cross-referenced by PHPXref |