PluginProbe
QuadMenu – Mega Menu / 3.3.8
QuadMenu – Mega Menu v3.3.8
3.3.8 3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 88 releases
quadmenu / redux / ReduxCore / inc / validation / css / validation_css.php

validation_css.php in QuadMenu – Mega Menu 3.3.8, at redux/ReduxCore/inc/validation/css/validation_css.php

47 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! class_exists( 'ReduxLegacy_Validation_css' ) ) {
4 class ReduxLegacy_Validation_css {
5
6 /**
7 * Field Constructor.
8 * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
9 *
10 * @since ReduxFrameworkLegacy 1.0.0
11 */
12 function __construct( $parent, $field, $value, $current ) {
13
14 $this->parent = $parent;
15 $this->field = $field;
16 $this->value = $value;
17 $this->current = $current;
18
19 $this->validate();
20 }
21
22 // function
23
24 /**
25 * Field Render Function.
26 * Takes the vars and validates them
27 *
28 * @since ReduxFrameworkLegacy 3.0.0
29 */
30 function validate() {
31
32 $data = $this->value;
33
34 $data = wp_filter_nohtml_kses( $data );
35 $data = str_replace( '&gt;', '>', $data );
36 $data = stripslashes( $data );
37
38 if ( $data != $this->value ) {
39 $this->field['msg'] = __( 'Unsafe strings were found in your CSS and have been filtered out.', 'redux-framework' );
40 $this->warning = $this->field;
41 }
42
43 $this->value = $data;
44 } //function
45 } //class
46 }
47