| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Font Collection class. This file contains the Font Collection class definition.
| File Size: | 295 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| __construct( string $slug, array $args ) X-Ref |
| WP_Font_Collection constructor. 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. |
| get_data() X-Ref |
| Retrieves the font collection data. return: array|WP_Error An array containing the font collection data, or a WP_Error on failure. |
| load_from_json( $file_or_url ) X-Ref |
| Loads font collection data from a JSON file or URL. param: string $file_or_url File path or URL to a JSON file containing the font collection data. return: array|WP_Error An array containing the font collection data on success, |
| load_from_file( $file ) X-Ref |
| Loads the font collection data from a JSON file path. param: string $file File path to a JSON file containing the font collection data. return: array|WP_Error An array containing the font collection data on success, |
| load_from_url( $url ) X-Ref |
| Loads the font collection data from a JSON file URL. param: string $url URL to a JSON file containing the font collection data. return: array|WP_Error An array containing the font collection data on success, |
| sanitize_and_validate_data( $data, $required_properties = array() X-Ref |
| Sanitizes and validates the font collection data. param: array $data Font collection data to sanitize and validate. param: array $required_properties Required properties that must exist in the passed data. return: array|WP_Error Sanitized data if valid, otherwise a WP_Error instance. |
| get_sanitization_schema() X-Ref |
| Retrieves the font collection sanitization schema. return: array Font collection sanitization schema. |
| Generated : Thu Oct 30 08:20:06 2025 | Cross-referenced by PHPXref |