晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/rainic/public_html/oldTZh/wp-content/plugins/wp-rocket/inc/Engine/License/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/rainic/public_html/oldTZh/wp-content/plugins/wp-rocket/inc/Engine/License/Subscriber.php
<?php
declare(strict_types=1);

namespace WP_Rocket\Engine\License;

use WP_Rocket\Event_Management\Subscriber_Interface;

class Subscriber implements Subscriber_Interface {
	/**
	 * Upgrade instance
	 *
	 * @var Upgrade
	 */
	private $upgrade;

	/**
	 * Renewal instance
	 *
	 * @var Renewal
	 */
	private $renewal;

	/**
	 * Instantiate the class
	 *
	 * @param Upgrade $upgrade Upgrade instance.
	 * @param Renewal $renewal Renewal instance.
	 */
	public function __construct( Upgrade $upgrade, Renewal $renewal ) {
		$this->upgrade = $upgrade;
		$this->renewal = $renewal;
	}

	/**
	 * Events this subscriber listens to.
	 *
	 * @return array
	 */
	public static function get_subscribed_events() {
		return [
			'rocket_dashboard_license_info'       => 'display_upgrade_section',
			'rocket_settings_page_footer'         => 'display_upgrade_popin',
			'rocket_menu_title'                   => [
				[ 'add_notification_bubble' ],
				[ 'add_notification_bubble_expired' ],
			],
			'admin_footer-settings_page_wprocket' => [
				[ 'dismiss_notification_bubble' ],
				[ 'set_dashboard_seen_transient' ],
			],
			'rocket_before_dashboard_content'     => [
				[ 'display_promo_banner' ],
				[ 'display_renewal_soon_banner', 11 ],
				[ 'display_renewal_expired_banner', 12 ],
			],
			'wp_ajax_rocket_dismiss_promo'        => 'dismiss_promo_banner',
			'wp_ajax_rocket_dismiss_renewal'      => 'dismiss_renewal_banner',
			'rocket_localize_admin_script'        => 'add_localize_script_data',
			'wp_rocket_upgrade'                   => [ 'clean_user_transient', 15, 2 ],
			'rocket_before_add_field_to_settings' => [
				[ 'maybe_disable_ocd', 11 ],
				[ 'add_license_expire_warning' ],
			],
			'get_rocket_option_remove_unused_css' => [ 'maybe_disable_option', PHP_INT_MAX ],
			'get_rocket_option_async_css'         => [ 'maybe_disable_option', PHP_INT_MAX ],
		];
	}

	/**
	 * Displays the upgrade section in the license info block
	 *
	 * @since 3.7.3
	 *
	 * @return void
	 */
	public function display_upgrade_section() {
		$this->upgrade->display_upgrade_section();
	}

	/**
	 * Displays the upgrade popin
	 *
	 * @since 3.7.3
	 *
	 * @return void
	 */
	public function display_upgrade_popin() {
		$this->upgrade->display_upgrade_popin();
	}

	/**
	 * Adds the notification bubble to the menu title if a promotion is active
	 *
	 * @since 3.7.4
	 *
	 * @param string $menu_title The text to be used for the menu.
	 * @return string
	 */
	public function add_notification_bubble( $menu_title ) {
		return $this->upgrade->add_notification_bubble( $menu_title );
	}

	/**
	 * Prevents the notification bubble from showing once the user accessed the dashboard once
	 *
	 * @since 3.7.4
	 *
	 * @return void
	 */
	public function dismiss_notification_bubble() {
		$this->upgrade->dismiss_notification_bubble();
	}

	/**
	 * Displays the promotions banner when a promotion is active
	 *
	 * @since 3.7.4
	 *
	 * @return void
	 */
	public function display_promo_banner() {
		$this->upgrade->display_promo_banner();
	}

	/**
	 * AJAX callback to dismiss the promotion banner
	 *
	 * @since 3.7.4
	 *
	 * @return void
	 */
	public function dismiss_promo_banner() {
		$this->upgrade->dismiss_promo_banner();
	}

	/**
	 * Adds the current time and promotion end time to WP Rocket localize script data
	 *
	 * @since 3.7.5 Add the renewal localize data
	 * @since 3.7.4
	 *
	 * @param array $data Localize script data.
	 * @return array
	 */
	public function add_localize_script_data( $data ) {
		$data = $this->upgrade->add_localize_script_data( $data );

		return $this->renewal->add_localize_script_data( $data );
	}

	/**
	 * Deletes the user data transient on 3.7.4 update
	 *
	 * @since 3.7.4
	 *
	 * @param string $new_version New version of the plugin.
	 * @param string $old_version Installed version of the plugin.
	 * @return void
	 */
	public function clean_user_transient( $new_version, $old_version ) {
		if ( version_compare( $old_version, '3.7.4', '>' ) ) {
			return;
		}

		delete_transient( 'wp_rocket_customer_data' );
	}

	/**
	 * Displays the renewal banner for users expiring in less than 30 days
	 *
	 * @since 3.7.5
	 *
	 * @return void
	 */
	public function display_renewal_soon_banner() {
		$this->renewal->display_renewal_soon_banner();
	}

	/**
	 * Displays the renewal banner for expired users
	 *
	 * @since 3.7.5
	 *
	 * @return void
	 */
	public function display_renewal_expired_banner() {
		$this->renewal->display_renewal_expired_banner();
	}

	/**
	 * AJAX callback to dismiss the renewal banner
	 *
	 * @since 3.7.5
	 *
	 * @return void
	 */
	public function dismiss_renewal_banner() {
		$this->renewal->dismiss_renewal_expired_banner();
	}

	/**
	 * Add license expiring warning to OCD label
	 *
	 * @param array $args Setting field arguments.
	 *
	 * @return array
	 */
	public function add_license_expire_warning( $args ): array {
		return $this->renewal->add_license_expire_warning( $args );
	}

	/**
	 * Adds the notification bubble to WP Rocket menu item when expired
	 *
	 * @param string $menu_title Menu title.
	 *
	 * @return string
	 */
	public function add_notification_bubble_expired( $menu_title ) {
		return $this->renewal->add_expired_bubble( $menu_title );
	}

	/**
	 * Sets the dashboard seen transient to hide the expired bubble
	 *
	 * @return void
	 */
	public function set_dashboard_seen_transient() {
		$this->renewal->set_dashboard_seen_transient();
	}

	/**
	 * Disable optimize CSS delivery setting
	 *
	 * @param array $args Array of setting field arguments.
	 *
	 * @return array
	 */
	public function maybe_disable_ocd( $args ) {
		return $this->renewal->maybe_disable_ocd( $args );
	}

	/**
	 * Disables the RUCSS & Async CSS options if license is expired
	 *
	 * @param mixed $value Current option value.
	 *
	 * @return mixed
	 */
	public function maybe_disable_option( $value ) {
		return $this->renewal->maybe_disable_option( $value );
	}
}

haha - 2025