PluginProbe
GutSlider – All in One Slider and Carousel Blocks for Gutenberg / 2.11.2
GutSlider – All in One Slider and Carousel Blocks for Gutenberg v2.11.2
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 / icons / AllowedSvg.php

AllowedSvg.php in GutSlider – All in One Slider and Carousel Blocks for Gutenberg 2.11.2, at includes/icons/AllowedSvg.php

51 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 declare( strict_types=1 );
3
4 namespace GutSlider\Icons;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 /**
11 * Defines allowed SVG tags for wp_kses sanitization.
12 *
13 * Provides the allowed tags and attributes configuration used when
14 * rendering SVG icons through WordPress's wp_kses() function.
15 *
16 * @package GutSlider\Icons
17 * @since 3.0.0
18 */
19 final class AllowedSvg {
20
21 /**
22 * Get the allowed SVG tag configuration for wp_kses.
23 *
24 * @since 3.0.0
25 *
26 * @return array<string, array<string, bool>> Allowed tags and their attributes.
27 */
28 public static function tags(): array {
29 return array(
30 'svg' => array(
31 'class' => true,
32 'aria-hidden' => true,
33 'aria-labelledby' => true,
34 'role' => true,
35 'xmlns' => true,
36 'width' => true,
37 'height' => true,
38 'viewbox' => true,
39 'fill' => true,
40 ),
41 'g' => array( 'fill' => true ),
42 'title' => array( 'title' => true ),
43 'path' => array(
44 'd' => true,
45 'fill' => true,
46 'fill-rule' => true,
47 ),
48 );
49 }
50 }
51