| Server IP : 62.72.47.131 / Your IP : 216.73.217.34 Web Server : Apache/2.4.66 (Debian) System : Linux 975cdb959a49 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : ( 501) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/elementor/modules/interactions/validators/ |
Upload File : |
<?php
namespace Elementor\Modules\Interactions\Validators;
use Elementor\Modules\Interactions\Validators\String_Value as StringValueValidator;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Breakpoints_Value {
public static function is_valid( $breakpoints_prop_value ) {
if ( ! is_array( $breakpoints_prop_value ) ) {
return false;
}
if ( ! isset( $breakpoints_prop_value['$$type'] ) || 'interaction-breakpoints' !== $breakpoints_prop_value['$$type'] ) {
return false;
}
if ( ! isset( $breakpoints_prop_value['value'] ) || ! is_array( $breakpoints_prop_value['value'] ) ) {
return false;
}
return self::validate_value( $breakpoints_prop_value['value'] );
}
private static function validate_value( $value ) {
if ( ! is_array( $value ) ) {
return false;
}
if ( ! isset( $value['excluded'] ) || ! is_array( $value['excluded'] ) ) {
return false;
}
return self::validate_excluded( $value['excluded'] );
}
private static function validate_excluded( $excluded ) {
if ( ! is_array( $excluded ) ) {
return false;
}
if ( ! isset( $excluded['$$type'] ) || 'excluded-breakpoints' !== $excluded['$$type'] ) {
return false;
}
if ( ! isset( $excluded['value'] ) || ! is_array( $excluded['value'] ) ) {
return false;
}
return self::validate_excluded_value( $excluded['value'] );
}
private static function validate_excluded_value( $value ) {
if ( ! is_array( $value ) ) {
return false;
}
foreach ( $value as $breakpoint_value ) {
if ( ! StringValueValidator::is_valid( $breakpoint_value ) ) {
return false;
}
}
return true;
}
}