PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.0.7
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.0.7
4.2.5 4.2.4 trunk 3.7.10 3.7.11 3.7.12 3.7.13 3.7.14 3.7.2 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8 3.8.1 3.8.10 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.8.9.1 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.5.1 4.0.6 4.0.6.1 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.2 4.2.3
widget-options / includes / widgets / gutenberg / lib / experimental / fonts-api / bc-layer / class-wp-webfonts-utils.php
widget-options / includes / widgets / gutenberg / lib / experimental / fonts-api / bc-layer Last commit date
class-gutenberg-fonts-api-bc-layer.php 1 year ago class-wp-web-fonts.php 1 year ago class-wp-webfonts-provider-local.php 1 year ago class-wp-webfonts-provider.php 1 year ago class-wp-webfonts-utils.php 1 year ago class-wp-webfonts.php 1 year ago webfonts-deprecations.php 1 year ago
class-wp-webfonts-utils.php
86 lines
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 return;
15 }
16
17 /**
18 * Utility helpers for the Webfonts API.
19 *
20 * @since X.X.X
21 * @deprecated GB 15.1 Use WP_Fonts_Utils instead.
22 */
23 class WP_Webfonts_Utils {
24
25 /**
26 * Converts the given font family into a handle.
27 *
28 * @since X.X.X
29 * @deprecated 15.1 Use WP_Fonts_Utils::convert_font_family_into_handle() instead.
30 *
31 * @param string $font_family Font family to convert into a handle.
32 * @return string|null The font family handle on success. Else, null.
33 */
34 public static function convert_font_family_into_handle( $font_family ) {
35 _deprecated_function( __METHOD__, 'GB 15.1', 'WP_Fonts_Utils::convert_font_family_into_handle()' );
36
37 return WP_Fonts_Utils::convert_font_family_into_handle( $font_family );
38 }
39
40 /**
41 * Converts the given variation and its font-family into a handle.
42 *
43 * @since X.X.X
44 * @deprecated 15.1 Use WP_Fonts_Utils::convert_variation_into_handle() instead.
45 *
46 * @param string $font_family The font family's handle for this variation.
47 * @param array $variation An array of variation properties.
48 * @return string|null The variation handle.
49 */
50 public static function convert_variation_into_handle( $font_family, array $variation ) {
51 _deprecated_function( __METHOD__, 'GB 15.1', 'WP_Fonts_Utils::convert_variation_into_handle()' );
52
53 return WP_Fonts_Utils::convert_variation_into_handle( $variation );
54 }
55
56 /**
57 * Gets the font family from the variation.
58 *
59 * @since X.X.X
60 * @deprecated 15.1 Use WP_Fonts_Utils::get_font_family_from_variation() instead.
61 *
62 * @param array $variation An array of variation properties to search.
63 * @return string|null The font family if defined. Else, null.
64 */
65 public static function get_font_family_from_variation( array $variation ) {
66 _deprecated_function( __METHOD__, 'GB 15.1', 'WP_Fonts_Utils::get_font_family_from_variation()' );
67
68 return WP_Fonts_Utils::get_font_family_from_variation( $variation );
69 }
70
71 /**
72 * Checks if the given input is defined, i.e. meaning is a non-empty string.
73 *
74 * @since X.X.X
75 * @deprecated 15.1 Use WP_Fonts_Utils::is_defined() instead.
76 *
77 * @param string $input The input to check.
78 * @return bool True when non-empty string. Else false.
79 */
80 public static function is_defined( $input ) {
81 _deprecated_function( __METHOD__, 'GB 15.1', 'WP_Fonts_Utils::is_defined()' );
82
83 return WP_Fonts_Utils::is_defined( $input );
84 }
85 }
86