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