PluginProbe
Gutenberg / 18.9.0
Gutenberg v18.9.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
gutenberg / lib / experimental / font-face / bc-layer / class-wp-fonts-resolver.php

class-wp-fonts-resolver.php in Gutenberg 18.9.0, at lib/experimental/font-face/bc-layer/class-wp-fonts-resolver.php

64 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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