PluginProbe
Gutenberg / 18.9.0
Gutenberg v18.9.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 12.6.0 All 403 releases
gutenberg / lib / experimental / font-face / bc-layer / class-wp-webfonts-utils.php

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

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