[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Fonts functions.
File Size: | 293 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
wp_print_font_faces( $fonts = array() X-Ref |
Generates and prints font-face styles for given fonts or theme.json fonts. param: array[][] $fonts { |
wp_print_font_faces_from_style_variations() X-Ref |
Generates and prints font-face styles defined the the theme style variations. |
wp_register_font_collection( string $slug, array $args ) X-Ref |
Registers a new font collection in the font library. See {@link https://schemas.wp.org/trunk/font-collection.json} for the schema the font collection data must adhere to. param: string $slug Font collection slug. May only contain alphanumeric characters, dashes, param: array $args { return: WP_Font_Collection|WP_Error A font collection if it was registered |
wp_unregister_font_collection( string $slug ) X-Ref |
Unregisters a font collection from the Font Library. param: string $slug Font collection slug. return: bool True if the font collection was unregistered successfully, else false. |
wp_get_font_dir() X-Ref |
Retrieves font uploads directory information. Same as wp_font_dir() but "light weight" as it doesn't attempt to create the font uploads directory. Intended for use in themes, when only 'basedir' and 'baseurl' are needed, generally in all cases when not uploading files. return: array See wp_font_dir() for description. |
wp_font_dir( $create_dir = true ) X-Ref |
Returns an array containing the current fonts upload directory's path and URL. param: bool $create_dir Optional. Whether to check and create the font uploads directory. Default true. return: array { |
_wp_filter_font_directory( $font_dir ) X-Ref |
A callback function for use in the {@see 'upload_dir'} filter. This function is intended for internal use only and should not be used by plugins and themes. Use wp_get_font_dir() instead. param: string $font_dir The font directory. return: string The modified font directory. |
_wp_after_delete_font_family( $post_id, $post ) X-Ref |
Deletes child font faces when a font family is deleted. param: int $post_id Post ID. param: WP_Post $post Post object. |
_wp_before_delete_font_face( $post_id, $post ) X-Ref |
Deletes associated font files when a font face is deleted. param: int $post_id Post ID. param: WP_Post $post Post object. |
_wp_register_default_font_collections() X-Ref |
Register the default font collections. |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |