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

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

199 lines 4.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WP Fonts API class.
4 *
5 * @package WordPress
6 * @subpackage Fonts API
7 * @since X.X.X
8 */
9
10 if ( ! class_exists( 'WP_Fonts' ) ) {
11
12 /**
13 * Class WP_Fonts
14 *
15 * @since X.X.X
16 * @deprecated 16.3.0 Fonts API is not supported.
17 */
18 class WP_Fonts extends WP_Dependencies {
19
20 /**
21 * Registered "origin", indicating the font is registered in the API.
22 *
23 * @since X.X.X
24 * @deprecated 16.3.0
25 *
26 * @var string
27 */
28 const REGISTERED_ORIGIN = 'gutenberg_wp_fonts_api';
29
30 /**
31 * Constructor.
32 *
33 * @since X.X.X
34 * @deprecated 16.3.0
35 */
36 public function __construct() {
37 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
38 }
39
40 /**
41 * Get the list of registered providers.
42 *
43 * @since X.X.X
44 * @deprecated 16.3.0 Providers are not supported.
45 */
46 public function get_providers() {
47 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
48 }
49
50 /**
51 * Register a provider.
52 *
53 * @since X.X.X
54 * @deprecated 16.3.0 Providers are not supported.
55 *
56 * @return bool False.
57 */
58 public function register_provider() {
59 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
60 return false;
61 }
62
63 /**
64 * Get the list of all registered font family handles.
65 *
66 * @since X.X.X
67 * @deprecated 16.3.0 Register is not supported.
68 *
69 * @return array Empty array.
70 */
71 public function get_registered_font_families() {
72 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
73 return array();
74 }
75
76 /**
77 * Get the list of all registered font families and their variations.
78 *
79 * @since X.X.X
80 * @deprecated 16.3.0 Register is not supported.
81 *
82 * @return array Empty array.
83 */
84 public function get_registered() {
85 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
86 return array();
87 }
88
89 /**
90 * Get the list of enqueued font families and their variations.
91 *
92 * @since X.X.X
93 * @deprecated 16.3.0 Enqueue is not supported.
94 *
95 * @return array Empty array.
96 */
97 public function get_enqueued() {
98 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
99 return array();
100 }
101
102 /**
103 * Registers a font family.
104 *
105 * @since X.X.X
106 * @deprecated 16.3.0 Add is not supported.
107 *
108 * @return null Null.
109 */
110 public function add_font_family() {
111 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
112 return null;
113 }
114
115 /**
116 * Removes a font family and all registered variations.
117 *
118 * @since X.X.X
119 * @deprecated 16.3.0 Remove is not supported.
120 */
121 public function remove_font_family() {
122 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
123 }
124
125 /**
126 * Add a variation to an existing family or register family if none exists.
127 *
128 * @since X.X.X
129 * @deprecated 16.3.0 Add is not supported.
130 *
131 * @return null Null.
132 */
133 public function add_variation() {
134 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
135 return null;
136 }
137
138 /**
139 * Removes a variation.
140 *
141 * @since X.X.X
142 * @deprecated 16.3.0 Remove is not supported.
143 */
144 public function remove_variation() {
145 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
146 }
147
148 /**
149 * Processes the items and dependencies.
150 *
151 * Processes the items passed to it or the queue, and their dependencies.
152 *
153 * @since X.X.X
154 * @deprecated 16.3.0 Processing items and dependencies is not supported.
155 *
156 * @param string|string[]|bool $handles Optional. Items to be processed: queue (false),
157 * single item (string), or multiple items (array of strings).
158 * Default false.
159 * @param int|false $group Optional. Group level: level (int), no group (false).
160 *
161 * @return array Empty array.
162 */
163 public function do_items( $handles = false, $group = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
164 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
165 return array();
166 }
167
168 /**
169 * Invokes each provider to process and print its styles.
170 *
171 * @since X.X.X
172 * @deprecated 16.3.0 Process and print provider styles is not supported.
173 *
174 * @see WP_Dependencies::do_item()
175 *
176 * @param string $provider_id The provider to process.
177 * @param int|false $group Not used.
178 * @return bool False.
179 */
180 public function do_item( $provider_id, $group = false ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
181 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
182 return false;
183 }
184
185 /**
186 * Converts the font family and its variations into theme.json structural format.
187 *
188 * @since X.X.X
189 * @deprecated 16.3.0 Convert is not supported.
190 *
191 * @return array Empty array.
192 */
193 public function to_theme_json() {
194 _deprecated_function( __METHOD__, 'Gutenberg 16.3.0' );
195 return array();
196 }
197 }
198 }
199