[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/fonts/ -> class-wp-font-library.php (summary)

Font Library class. This file contains the Font Library class definition.

File Size: 142 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Font_Library:: (6 methods):
  register_font_collection()
  unregister_font_collection()
  is_collection_registered()
  get_font_collections()
  get_font_collection()
  get_instance()


Class: WP_Font_Library  - X-Ref

Font Library class.

register_font_collection( string $slug, array $args )   X-Ref
Register a new font collection.

return: WP_Font_Collection|WP_Error A font collection if it was registered successfully,
param: string $slug Font collection slug. May only contain alphanumeric characters, dashes,
param: array  $args Font collection data. See wp_register_font_collection() for information on accepted arguments.

unregister_font_collection( string $slug )   X-Ref
Unregisters a previously registered font collection.

return: bool True if the font collection was unregistered successfully and false otherwise.
param: string $slug Font collection slug.

is_collection_registered( string $slug )   X-Ref
Checks if a font collection is registered.

return: bool True if the font collection is registered and false otherwise.
param: string $slug Font collection slug.

get_font_collections()   X-Ref
Gets all the font collections available.

return: array List of font collections.

get_font_collection( string $slug )   X-Ref
Gets a font collection.

return: WP_Font_Collection|null Font collection object, or null if the font collection doesn't exist.
param: string $slug Font collection slug.

get_instance()   X-Ref
Utility method to retrieve the main instance of the class.

The instance will be created if it does not exist yet.

return: WP_Font_Library The main instance.



Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref