PluginProbe
GutSlider – All in One Slider and Carousel Blocks for Gutenberg / trunk
GutSlider – All in One Slider and Carousel Blocks for Gutenberg vtrunk
3.1.0 3.0.0 2.13.2 2.13.1 2.13.0 trunk 1.0.0 2.1.0 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.1 2.5.3 2.5.4 2.5.5 2.6.1 All 56 releases
slider-blocks / includes / compat.php

compat.php in GutSlider – All in One Slider and Carousel Blocks for Gutenberg trunk, at includes/compat.php

42 lines 932 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Backward-compatibility wrappers for global functions.
4 *
5 * These functions are used by block render templates in src/ and must
6 * remain available in the global namespace.
7 *
8 * @package GutSlider
9 * @since 3.0.0
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 if ( ! function_exists( 'gutslider_display_icon' ) ) {
17 /**
18 * Retrieve an SVG icon by key.
19 *
20 * @since 1.0.0
21 *
22 * @param string $icon Icon identifier key.
23 * @return string SVG markup or empty string.
24 */
25 function gutslider_display_icon( string $icon = '' ): string {
26 return \GutSlider\Icons\Icons::get( $icon );
27 }
28 }
29
30 if ( ! function_exists( 'gutslider_allowed_svg_tags' ) ) {
31 /**
32 * Get allowed SVG tags for wp_kses sanitization.
33 *
34 * @since 1.0.0
35 *
36 * @return array<string, array<string, bool>> Allowed SVG tags and attributes.
37 */
38 function gutslider_allowed_svg_tags(): array {
39 return \GutSlider\Icons\AllowedSvg::tags();
40 }
41 }
42