PHP 8.2.31
Preview: custom-effect-value.php Size: 851 B
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/elementor/modules/interactions/validators/custom-effect-value.php

<?php

namespace Elementor\Modules\Interactions\Validators;

use Elementor\Modules\AtomicWidgets\Parsers\Props_Parser;
use Elementor\Modules\Interactions\Props\Custom_Effect_Prop_Type;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * TODO: At least a value validator interface to enforce is_valid fxn for consistency
 */
class Custom_Effect_Value {
	public static function is_valid( array $animation_value ): bool {
		$effect_value = $animation_value['effect']['value'] ?? null;

		if ( 'custom' !== $effect_value ) {
			return true;
		}

		if ( ! isset( $animation_value['custom_effect'] ) ) {
			return false;
		}

		$props_parser = Props_Parser::make( [
			'custom_effect' => Custom_Effect_Prop_Type::make(),
		] );

		$result = $props_parser->parse( [ 'custom_effect' => $animation_value['custom_effect'] ] );

		return $result->is_valid();
	}
}

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
1.61 KB lrw-r--r-- 2026-03-30 13:49:26
Edit Download
851 B lrw-r--r-- 2026-03-30 13:49:26
Edit Download
634 B lrw-r--r-- 2026-03-30 13:49:26
Edit Download
505 B lrw-r--r-- 2026-03-30 13:49:26
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).