| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\Interactions\Validators; |
| 4 |
|
| 5 |
use Elementor\Modules\Interactions\Validators\String_Value as StringValueValidator; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly. |
| 9 |
} |
| 10 |
|
| 11 |
class Trigger_Value { |
| 12 |
private const VALID_TRIGGERS = [ |
| 13 |
'load', |
| 14 |
'scrollIn', |
| 15 |
'scrollOut', |
| 16 |
'scrollOn', |
| 17 |
'hover', |
| 18 |
'click', |
| 19 |
]; |
| 20 |
|
| 21 |
public static function is_valid( $trigger_prop_value ) { |
| 22 |
return StringValueValidator::is_valid( $trigger_prop_value, static::VALID_TRIGGERS ); |
| 23 |
} |
| 24 |
} |
| 25 |
|