| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! class_exists( 'Redux_Validation_html' ) ) { |
| 4 |
class Redux_Validation_html { |
| 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 ReduxFramework 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 |
} //function |
| 21 |
|
| 22 |
/** |
| 23 |
* Field Render Function. |
| 24 |
* Takes the vars and validates them |
| 25 |
* |
| 26 |
* @since ReduxFramework 1.0.0 |
| 27 |
*/ |
| 28 |
function validate() { |
| 29 |
|
| 30 |
$this->value = wp_kses_post( $this->value ); |
| 31 |
} //function |
| 32 |
} //class |
| 33 |
} |