lib/experimental/font-face/bc-layer
class-gutenberg-fonts-api-bc-layer.php
1.1 KB
2 years ago
class-wp-fonts-provider-local.php
943 B
2 years ago
class-wp-fonts-provider.php
1.9 KB
2 years ago
class-wp-fonts-resolver.php
1.6 KB
2 years ago
class-wp-fonts-utils.php
1.6 KB
2 years ago
class-wp-fonts.php
4.8 KB
2 years ago
class-wp-web-fonts.php
4.6 KB
2 years ago
class-wp-webfonts-provider-local.php
1.5 KB
2 years ago
class-wp-webfonts-provider.php
1.3 KB
2 years ago
class-wp-webfonts-utils.php
2.1 KB
2 years ago
class-wp-webfonts.php
3.4 KB
2 years ago
webfonts-deprecations.php
7.1 KB
1 year ago
class-wp-webfonts-utils.php in Gutenberg 23.2.0, at lib/experimental/font-face/bc-layer/class-wp-webfonts-utils.php
| 1 | <?php |
| 2 | /** |
| 3 | * Webfont API's utility helpers. |
| 4 | * |
| 5 | * BACKPORT NOTE: Do not backport this file to Core. |
| 6 | * This file is now part of the API's Backwards-Compatibility (BC) layer. |
| 7 | * |
| 8 | * @package WordPress |
| 9 | * @subpackage Fonts API |
| 10 | * @since X.X.X |
| 11 | */ |
| 12 | |
| 13 | if ( ! class_exists( 'WP_Webfonts_Utils' ) ) { |
| 14 | |
| 15 | /** |
| 16 | * Utility helpers for the Webfonts API. |
| 17 | * |
| 18 | * @since X.X.X |
| 19 | * @deprecated 15.1 Use WP_Fonts_Utils instead. |
| 20 | * @deprecated 16.3.0 Webfonts API is not supported. |
| 21 | */ |
| 22 | class WP_Webfonts_Utils { |
| 23 | |
| 24 | /** |
| 25 | * Converts the given font family into a handle. |
| 26 | * |
| 27 | * @since X.X.X |
| 28 | * @deprecated 15.1 Use WP_Fonts_Utils::convert_font_family_into_handle() instead. |
| 29 | * @deprecated 16.3.0 This method is not supported. |
| 30 | * |
| 31 | * @return null |
| 32 | */ |
| 33 | public static function convert_font_family_into_handle() { |
| 34 | _deprecated_function( __METHOD__, 'Gutenberg 15.1' ); |
| 35 | return null; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Converts the given variation and its font-family into a handle. |
| 40 | * |
| 41 | * @since X.X.X |
| 42 | * @deprecated 15.1 Use WP_Fonts_Utils::convert_variation_into_handle() instead. |
| 43 | * @deprecated 16.3.0 This method is not supported. |
| 44 | * |
| 45 | * @return null |
| 46 | */ |
| 47 | public static function convert_variation_into_handle() { |
| 48 | _deprecated_function( __METHOD__, 'Gutenberg 15.1' ); |
| 49 | return null; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Gets the font family from the variation. |
| 54 | * |
| 55 | * @since X.X.X |
| 56 | * @deprecated 15.1 Use WP_Fonts_Utils::get_font_family_from_variation() instead. |
| 57 | * @deprecated 16.3.0 This method is not supported. |
| 58 | * |
| 59 | * @return null |
| 60 | */ |
| 61 | public static function get_font_family_from_variation() { |
| 62 | _deprecated_function( __METHOD__, 'Gutenberg 15.1' ); |
| 63 | return null; |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Checks if the given input is defined, i.e. meaning is a non-empty string. |
| 68 | * |
| 69 | * @since X.X.X |
| 70 | * @deprecated 15.1 Use WP_Fonts_Utils::is_defined() instead. |
| 71 | * @deprecated 16.3.0 This method is not supported. |
| 72 | * |
| 73 | * @param string $input The input to check. |
| 74 | * @return bool True when non-empty string. Else false. |
| 75 | */ |
| 76 | public static function is_defined( $input ) { |
| 77 | _deprecated_function( __METHOD__, 'Gutenberg 15.1' ); |
| 78 | return ( is_string( $input ) && ! empty( $input ) ); |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 |