| 1 |
<?php |
| 2 |
/** |
| 3 |
* WP_Fonts_Resolver class. |
| 4 |
* |
| 5 |
* @package WordPress |
| 6 |
* @subpackage Fonts API |
| 7 |
* @since X.X.X |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! class_exists( 'WP_Fonts_Resolver' ) ) { |
| 11 |
|
| 12 |
/** |
| 13 |
* The Fonts API Resolver abstracts the processing of different data sources |
| 14 |
* (such as theme.json and global styles) for font interactions with the API. |
| 15 |
* |
| 16 |
* This class is for internal core usage and is not supposed to be used by |
| 17 |
* extenders (plugins and/or themes). |
| 18 |
* |
| 19 |
* @access private |
| 20 |
* |
| 21 |
* @since X.X.X |
| 22 |
* @deprecated 16.3.0 Fonts API is not supported. |
| 23 |
*/ |
| 24 |
class WP_Fonts_Resolver { |
| 25 |
|
| 26 |
/** |
| 27 |
* Enqueues user-selected fonts via global styles. |
| 28 |
* |
| 29 |
* @since X.X.X |
| 30 |
* @deprecated 16.3.0 Enqueue is not supported. |
| 31 |
* |
| 32 |
* @return array Empty array. |
| 33 |
*/ |
| 34 |
public static function enqueue_user_selected_fonts() { |
| 35 |
_deprecated_function( __FUNCTION__, 'Gutenberg 16.3' ); |
| 36 |
return array(); |
| 37 |
} |
| 38 |
|
| 39 |
/** |
| 40 |
* Register fonts defined in theme.json. |
| 41 |
* |
| 42 |
* @since X.X.X |
| 43 |
* @deprecated 16.3.0 Register is not supported. |
| 44 |
*/ |
| 45 |
public static function register_fonts_from_theme_json() { |
| 46 |
_deprecated_function( __FUNCTION__, 'Gutenberg 16.3' ); |
| 47 |
} |
| 48 |
|
| 49 |
/** |
| 50 |
* Add missing fonts to the global styles. |
| 51 |
* |
| 52 |
* @since X.X.X |
| 53 |
* @deprecated 16.3.0 Adding fonts into theme.json theme data layer is not supported. |
| 54 |
* |
| 55 |
* @param WP_Theme_JSON_Gutenberg|WP_Theme_JSON $data The global styles. |
| 56 |
* @return WP_Theme_JSON_Gutenberg|WP_Theme_JSON Unchanged global styles. |
| 57 |
*/ |
| 58 |
public static function add_missing_fonts_to_theme_json( $data ) { |
| 59 |
_deprecated_function( __FUNCTION__, 'Gutenberg 16.3' ); |
| 60 |
return $data; |
| 61 |
} |
| 62 |
} |
| 63 |
} |
| 64 |
|