PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.0
Elementor Website Builder – more than just a page builder v3.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/admin/ui/components/button.php +5 -6 4.2.23.2.0 View file →
@@ -10,9 +10,8 @@
10 10
11 11 class Button extends Base_Object {
12 12
13 13 private $options;
14 -
15 14 /**
16 15 * @inheritDoc
17 16 */
18 17 public function get_name() {
@@ -31,9 +30,9 @@
31 30 $icon = '';
32 31 $attributes = [];
33 32
34 33 if ( ! empty( $options['icon'] ) ) {
35 - $icon = '<i class="' . esc_attr( $options['icon'] ) . '"></i>';
34 + $icon = '<i class="' . $options['icon'] . '"></i>';
36 35 }
37 36
38 37 $classes = $options['classes'];
39 38
@@ -49,9 +48,9 @@
49 48 $classes[] = 'e-button--' . $options['variant'];
50 49 }
51 50
52 51 if ( ! empty( $options['before'] ) ) {
53 - $before = '<span>' . wp_kses_post( $options['before'] ) . '</span>';
52 + $before = '<span>' . $options['before'] . '</span>';
54 53 }
55 54
56 55 if ( ! empty( $options['url'] ) ) {
57 56 $attributes['href'] = $options['url'];
@@ -66,13 +65,13 @@
66 65 $html .= $icon;
67 66 $html .= '<span>' . sanitize_text_field( $options['text'] ) . '</span>';
68 67 $html .= '</' . $html_tag . '>';
69 68
70 - echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
69 + echo $html;
71 70 }
72 71
73 72 /**
74 - * @param string $option Optional default is null.
73 + * @param string $option Optional default is null
75 74 * @return array|mixed
76 75 */
77 76 private function get_options( $option = null ) {
78 77 return $this->get_items( $this->options, $option );
@@ -93,9 +92,9 @@
93 92 'variant' => '',
94 93 'before' => '',
95 94 ];
96 95
97 - if ( null !== $option && -1 !== in_array( $option, $default_options, true ) ) {
96 + if ( null !== $option && -1 !== in_array( $option, $default_options ) ) {
98 97 return $default_options[ $option ];
99 98 }
100 99
101 100 return $default_options;