| 1 |
<?php |
| 2 |
/** |
| 3 |
* Font API's utility helpers. |
| 4 |
* |
| 5 |
* @package WordPress |
| 6 |
* @subpackage Fonts API |
| 7 |
* @since X.X.X |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! class_exists( 'WP_Fonts_Utils' ) ) { |
| 11 |
|
| 12 |
/** |
| 13 |
* Utility helpers for the Fonts API. |
| 14 |
* |
| 15 |
* @since X.X.X |
| 16 |
* @deprecated 16.3.0 Fonts API is not supported. |
| 17 |
*/ |
| 18 |
class WP_Fonts_Utils { |
| 19 |
|
| 20 |
/** |
| 21 |
* Converts the given font family into a handle. |
| 22 |
* |
| 23 |
* @since X.X.X |
| 24 |
* @deprecated 16.3.0 This method is not supported. |
| 25 |
* |
| 26 |
* @return null |
| 27 |
*/ |
| 28 |
public static function convert_font_family_into_handle() { |
| 29 |
_deprecated_function( __METHOD__, 'Gutenberg 16.3.0' ); |
| 30 |
return null; |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Converts the given variation and its font-family into a handle. |
| 35 |
* |
| 36 |
* @since X.X.X |
| 37 |
* @deprecated 16.3.0 This method is not supported. |
| 38 |
* |
| 39 |
* @return null |
| 40 |
*/ |
| 41 |
public static function convert_variation_into_handle() { |
| 42 |
_deprecated_function( __METHOD__, 'Gutenberg 16.3.0' ); |
| 43 |
return null; |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* Gets the font family from the variation. |
| 48 |
* |
| 49 |
* @since X.X.X |
| 50 |
* @deprecated 16.3.0 This method is not supported. |
| 51 |
* |
| 52 |
* @return null Null. |
| 53 |
*/ |
| 54 |
public static function get_font_family_from_variation() { |
| 55 |
_deprecated_function( __METHOD__, 'Gutenberg 16.3.0' ); |
| 56 |
return null; |
| 57 |
} |
| 58 |
|
| 59 |
/** |
| 60 |
* Checks if the given input is defined, i.e. meaning is a non-empty string. |
| 61 |
* |
| 62 |
* @since X.X.X |
| 63 |
* @deprecated 16.3.0 |
| 64 |
* |
| 65 |
* @param string $input The input to check. |
| 66 |
* @return bool True when non-empty string. Else false. |
| 67 |
*/ |
| 68 |
public static function is_defined( $input ) { |
| 69 |
_deprecated_function( __METHOD__, 'Gutenberg 16.3.0' ); |
| 70 |
return ( is_string( $input ) && ! empty( $input ) ); |
| 71 |
} |
| 72 |
} |
| 73 |
} |
| 74 |
|