REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.71 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/elementor/modules/interactions/parser.php
Text
Base64
<?php namespace Elementor\Modules\Interactions; use Elementor\Modules\AtomicWidgets\Utils\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Parser { protected $post_id; protected $ids_lookup = []; public function __construct( $post_id ) { $this->post_id = $post_id; } public function assign_interaction_ids( $data ) { if ( isset( $data['elements'] ) && is_array( $data['elements'] ) ) { $data['elements'] = $this->process_interactions_for( $data['elements'] ); } return $data; } private function process_interactions_for( $elements ) { if ( ! is_array( $elements ) ) { return $elements; } foreach ( $elements as &$element ) { if ( isset( $element['interactions'] ) ) { $element['interactions'] = $this->maybe_assign_interaction_ids( $element['interactions'], $element['id'] ); } if ( isset( $element['elements'] ) && is_array( $element['elements'] ) ) { $element['elements'] = $this->process_interactions_for( $element['elements'] ); } } return $elements; } private function maybe_assign_interaction_ids( $interactions_json, $element_id ) { $interactions = $this->decode_interactions( $interactions_json ); if ( ! isset( $interactions['items'] ) ) { return []; } foreach ( $interactions['items'] as &$interaction ) { if ( ! isset( $interaction['$$type'] ) || 'interaction-item' !== $interaction['$$type'] ) { continue; } $existing_id = null; if ( isset( $interaction['value']['interaction_id']['value'] ) ) { $existing_id = $interaction['value']['interaction_id']['value']; } if ( $existing_id && $this->is_temp_id( $existing_id ) ) { $interaction['value']['interaction_id'] = [ '$$type' => 'string', 'value' => $this->get_next_interaction_id( $element_id ), ]; } elseif ( $existing_id ) { $this->ids_lookup[] = $existing_id; } else { $interaction['value']['interaction_id'] = [ '$$type' => 'string', 'value' => $this->get_next_interaction_id( $element_id ), ]; } } return wp_json_encode( $interactions ); } private function is_temp_id( $id ) { return is_string( $id ) && strpos( $id, 'temp-' ) === 0; } private function decode_interactions( $interactions ) { if ( is_array( $interactions ) ) { return $interactions; } if ( is_string( $interactions ) ) { $decoded = json_decode( $interactions, true ); if ( json_last_error() === JSON_ERROR_NONE && is_array( $decoded ) ) { return $decoded; } } return [ 'items' => [], 'version' => 1, ]; } protected function get_next_interaction_id( $prefix ) { $next_id = Utils::generate_id( "{$this->post_id}-{$prefix}-", $this->ids_lookup ); $this->ids_lookup[] = $next_id; return $next_id; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 4 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
cache
DIR
-
drwxr-xr-x
2026-06-10 02:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
props
DIR
-
drwxr-xr-x
2026-06-10 02:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
schema
DIR
-
drwxr-xr-x
2026-06-10 02:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validators
DIR
-
drwxr-xr-x
2026-06-10 02:40:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
interactions-collector.php
1.63 KB
lrw-r--r--
2026-03-30 13:49:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
interactions-frontend-handler.php
3.74 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
module.php
5.70 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
parser.php
2.71 KB
lrw-r--r--
2026-02-02 14:52:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
presets.php
1.72 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validation.php
10.86 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).