/var/www/leolaart.com/www/wp-content/plugins/polylang/include
NameSizeModeActions
api.php177630666editdlrm
base.php59320666editdlrm
cache.php25030666editdlrm
class-polylang.php87590666editdlrm
cookie.php34330666editdlrm
crud-posts.php155110666editdlrm
crud-terms.php101050666editdlrm
db-tools.php10380666editdlrm
filter-rest-routes.php49880666editdlrm
filters-links.php56860666editdlrm
filters-sanitization.php33110666editdlrm
filters-widgets-options.php26340666editdlrm
filters.php157520666editdlrm
functions.php71730666editdlrm
language-deprecated.php73550666editdlrm
language-factory.php95350666editdlrm
language.php184700666editdlrm
license.php94150666editdlrm
links-abstract-domain.php32400666editdlrm
links-default.php31000666editdlrm
links-directory.php97210666editdlrm
links-domain.php31360666editdlrm
links-model.php66390666editdlrm
links-permalinks.php57530666editdlrm
links-subdomain.php22160666editdlrm
links.php13310666editdlrm
mo.php20200666editdlrm
model.php346510666editdlrm
nav-menu.php45330666editdlrm
olt-manager.php85670666editdlrm
query.php65440666editdlrm
rest-request.php31940666editdlrm
static-pages.php64150666editdlrm
switcher.php111510666editdlrm
translatable-object-with-types-interface.php11270666editdlrm
translatable-object-with-types-trait.php19360666editdlrm
translatable-object.php135930666editdlrm
translatable-objects.php35690666editdlrm
translate-option.php127590666editdlrm
translated-object.php167860666editdlrm
translated-post.php119640666editdlrm
translated-term.php100080666editdlrm
walker-dropdown.php35380666editdlrm
walker-list.php23080666editdlrm
walker.php23360666editdlrm
widget-calendar.php96670666editdlrm
widget-languages.php46780666editdlrm
Edit: /var/www/leolaart.com/www/wp-content/plugins/polylang/include/cache.php (2503B)
> */ protected $cache = array(); /** * Constructor. * * @since 1.7 */ public function __construct() { $this->blog_id = get_current_blog_id(); add_action( 'switch_blog', array( $this, 'switch_blog' ) ); } /** * Called when switching blog. * * @since 1.7 * * @param int $new_blog_id New blog ID. * @return void */ public function switch_blog( $new_blog_id ) { $this->blog_id = $new_blog_id; } /** * Adds a value in cache. * * @since 1.7 * @since 3.6 Returns the cached value. * * @param string $key Cache key. * @param mixed $data The value to add to the cache. * @return mixed * * @phpstan-param non-empty-string $key * @phpstan-param TCacheData $data * @phpstan-return TCacheData */ public function set( $key, $data ) { $this->cache[ $this->blog_id ][ $key ] = $data; return $data; } /** * Returns value from cache. * * @since 1.7 * * @param string $key Cache key. * @return mixed * * @phpstan-param non-empty-string $key * @phpstan-return TCacheData|false */ public function get( $key ) { return isset( $this->cache[ $this->blog_id ][ $key ] ) ? $this->cache[ $this->blog_id ][ $key ] : false; } /** * Cleans the cache (for this blog only). * * @since 1.7 * * @param string $key Optional. Cache key. An empty string to clean the whole cache for the current blog. * Default is an empty string. * @return void */ public function clean( $key = '' ) { if ( '' === $key ) { unset( $this->cache[ $this->blog_id ] ); } else { unset( $this->cache[ $this->blog_id ][ $key ] ); } } /** * Generates and returns a "unique" cache key, depending on `$data` and prefixed by `$prefix`. * * @since 3.6 * * @param string $prefix String to prefix the cache key. * @param string|array|object $data Data. * @return string * * @phpstan-param non-empty-string $prefix * @phpstan-return non-empty-string */ public function get_unique_key( string $prefix, $data ): string { /** @var scalar */ $serialized = maybe_serialize( $data ); return $prefix . md5( (string) $serialized ); } }