CyberAlphaWolf

Server : Apache
System : Linux 182.49.167.72.host.secureserver.net 4.18.0-553.92.1.el8_10.x86_64 #1 SMP Wed Jan 14 06:31:58 EST 2026 x86_64
User : kikai ( 1014)
PHP Version : 8.3.30
Disable Function : NONE
Directory :  /home/kikai/www/wp-content/plugins/hummingbird-performance/core/integration/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/kikai/www/wp-content/plugins/hummingbird-performance/core/integration/class-elementor.php
<?php
/**
 * Integration with Elementor.
 *
 * @package Hummingbird\Core\Integration
 */

namespace Hummingbird\Core\Integration;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Elementor
 */
class Elementor {

	/**
	 * Elementor constructor.
	 */
	public function __construct() {
		add_filter( 'wphb_dont_add_handle_to_collection', array( $this, 'wphb_dont_add_handle_to_collection' ), 10, 4 );
	}

	/**
	 * Do not add handle to collection for the Elementor dynamic enqueue styles.
	 *
	 * @param bool   $value      Current value.
	 * @param string $handle     Resource handle.
	 * @param string $source_url Script URL.
	 * @param string $type       Resource type.
	 *
	 * @return bool
	 */
	public function wphb_dont_add_handle_to_collection( $value, $handle, $source_url, $type ) {
		if ( 'styles' === $type && $this->is_elementor_active() && strpos( $handle, 'elementor-post-' ) !== false ) {
			return true;
		}

		return $value;
	}

	/**
	 * Check if Elementor is active.
	 *
	 * @return bool
	 */
	private function is_elementor_active() {
		return class_exists( 'Elementor\Plugin' );
	}
}

XYZEAZ - Cyber Alpha Wolf © All Rights Reserved