Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
subversal
/
video
/
wp-content
/
plugins
/
atlas-core
/
framework
/
redux-core
/
inc
/
validation
/
js
:
class-redux-validation-js.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /** * Javascript validation * * @package Redux Framework * @subpackage Validation * @author Kevin Provance (kprovance) & Dovy Paukstys * @version 4.0.0 */ defined( 'ABSPATH' ) || exit; if ( ! class_exists( 'Redux_Validation_Js', false ) ) { /** * Class Redux_Validation_Js */ class Redux_Validation_Js extends Redux_Validate { /** * Field Validation Function. * Takes the vars and validates them * * @since ReduxFramework 1.0.0 */ public function validate() { $this->field['msg'] = $this->field['msg'] ?? esc_html__( 'Javascript has been successfully escaped.', 'redux-framework' ); $js = esc_js( $this->value ); if ( $js !== $this->value ) { $this->field['current'] = $js; $this->warning = $this->field; } $this->value = $js; } } }