[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

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

Defines 7 functions

  __construct()
  get_data()
  load_from_json()
  load_from_file()
  load_from_url()
  sanitize_and_validate_data()
  get_sanitization_schema()

Functions
Functions that are not part of a class:

__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.

return: array|WP_Error An array containing the font collection data on success,
param: string $file_or_url File path or URL to a JSON file containing the font collection data.

load_from_file( $file )   X-Ref
Loads the font collection data from a JSON file path.

return: array|WP_Error An array containing the font collection data on success,
param: string $file File path to a JSON file containing the font collection data.

load_from_url( $url )   X-Ref
Loads the font collection data from a JSON file URL.

return: array|WP_Error An array containing the font collection data on success,
param: string $url URL to a JSON file containing the font collection data.

sanitize_and_validate_data( $data, $required_properties = array()   X-Ref
Sanitizes and validates the font collection data.

return: array|WP_Error Sanitized data if valid, otherwise a WP_Error instance.
param: array $data                Font collection data to sanitize and validate.
param: array $required_properties Required properties that must exist in the passed data.

get_sanitization_schema()   X-Ref
Retrieves the font collection sanitization schema.

return: array Font collection sanitization schema.



Generated : Sat Apr 27 08:20:02 2024 Cross-referenced by PHPXref