HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/wpforms/src/Pro/Integrations/Elementor/Elementor.php
<?php

namespace WPForms\Pro\Integrations\Elementor;

use Elementor\Plugin as ElementorPlugin;

/**
 * Improve Elementor Compatibility.
 *
 * @since 1.7.0
 */
class Elementor extends \WPForms\Integrations\Elementor\Elementor {

	/**
	 * Load assets in the preview panel.
	 *
	 * @since 1.7.0
	 */
	public function preview_assets() {

		if ( ! ElementorPlugin::$instance->preview->is_preview_mode() ) {
			return;
		}

		parent::preview_assets();

		$min = wpforms_get_min_suffix();

		wp_enqueue_style(
			'wpforms-pro-integrations',
			WPFORMS_PLUGIN_URL . "assets/pro/css/admin-integrations{$min}.css",
			[],
			WPFORMS_VERSION
		);
	}

	/**
	 * Load assets in the elementor document.
	 *
	 * @since 1.7.0
	 */
	public function editor_assets() {

		if ( empty( $_GET['action'] ) || $_GET['action'] !== 'elementor' ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
			return;
		}

		parent::editor_assets();

		$min = wpforms_get_min_suffix();

		wp_enqueue_style(
			'wpforms-pro-integrations',
			WPFORMS_PLUGIN_URL . "assets/pro/css/admin-integrations{$min}.css",
			[],
			WPFORMS_VERSION
		);
	}
}