HEX
Server: LiteSpeed
System: Linux pulsar191.sitesanctuary.org 5.14.0-284.30.1.el9.tuxcare.els9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jan 10 17:34:05 UTC 2025 x86_64
User: lgooir (1604)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/lgooir/.trash/elementor/modules/compatibility-tag/module.php
<?php
namespace Elementor\Modules\CompatibilityTag;

use Elementor\Plugin;
use Elementor\Core\Utils\Version;
use Elementor\Core\Utils\Collection;

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

/**
 * Inspired By WooCommerce.
 *
 * @link  https://github.com/woocommerce/woocommerce/blob/master/includes/admin/plugin-updates/class-wc-plugin-updates.php
 */
class Module extends Base_Module {
	/**
	 * This is the header used by extensions to show testing.
	 *
	 * @var string
	 */
	const PLUGIN_VERSION_TESTED_HEADER = 'Elementor tested up to';

	/**
	 * @return string
	 */
	protected function get_plugin_header() {
		return static::PLUGIN_VERSION_TESTED_HEADER;
	}

	/**
	 * @return string
	 */
	protected function get_plugin_label() {
		return esc_html__( 'Elementor', 'elementor' );
	}

	/**
	 * @return string
	 */
	protected function get_plugin_name() {
		return ELEMENTOR_PLUGIN_BASE;
	}

	/**
	 * @return string
	 */
	protected function get_plugin_version() {
		return ELEMENTOR_VERSION;
	}

	/**
	 * @return Collection
	 */
	protected function get_plugins_to_check() {
		return parent::get_plugins_to_check()
			->merge( $this->get_plugins_with_plugin_title_in_their_name() );
	}

	/**
	 * Get all the plugins that has the name of the current plugin in their name.
	 *
	 * @return Collection
	 */
	private function get_plugins_with_plugin_title_in_their_name() {
		return Plugin::$instance->wp
			->get_plugins()
			->except( [
				'elementor/elementor.php',
				'elementor-beta/elementor-beta.php',
				'block-builder/block-builder.php',
			] )
			->filter( function ( array $data ) {
				return false !== strpos( strtolower( $data['Name'] ), 'elementor' );
			} );
	}
}