PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
sitepress-multilingual-cms
/
classes
/
utilities
<?php class WPML_Cache_Factory { /** @var array */ private $valid_caches = [ 'TranslationManagement::get_translation_job_id' => [ 'clear_actions' => [ 'wpml_tm_save_post', 'wpml_cache_clear' ], ], 'WPML_Element_Type_Translation::get_language_for_element' => [ 'clear_actions' => [ 'wpml_translation_update' ], ], 'WPML_Post_Status::needs_update' => [ 'clear_actions' => [ 'wpml_translation_status_update' ], ], ]; public function __construct() { foreach ( $this->valid_caches as $cache_name => $clear_actions ) { $this->init_clear_actions( $cache_name, $clear_actions['clear_actions'] ); } } /** * @param string $cache_name * * @return WPML_WP_Cache * @throws InvalidArgumentException Exception. */ public function get( $cache_name ) { if ( isset( $this->valid_caches[ $cache_name ] ) ) { return new WPML_WP_Cache( $cache_name ); } else { throw new InvalidArgumentException( $cache_name . ' is not a valid cache for the WPML_Cache_Factory' ); } } /** * @param string $cache_name * @param array $clear_actions */ public function define( $cache_name, array $clear_actions ) { if ( isset( $this->valid_caches[ $cache_name ] ) ) { return; } $this->valid_caches[ $cache_name ] = [ 'clear_actions' => $clear_actions, ]; $this->init_clear_actions( $cache_name, $clear_actions ); } private function init_clear_actions( $cache_name, array $clear_actions ) { foreach ( $clear_actions as $clear_action ) { add_action( $clear_action, function () use ( $cache_name ) { $cache = new WPML_WP_Cache( $cache_name ); $cache->flush_group_cache(); } ); } } }
[-] class-wpml-wp-cache-factory.php
[edit]
[-] class-wpml-inactive-content.php
[edit]
[-] class-wpml-slash-management.php
[edit]
[-] class-wpml-transient.php
[edit]
[-] class-wpml-ajax.php
[edit]
[-] class-wpml-locale.php
[edit]
[-] class-wpml-string-functions.php
[edit]
[-] class-wpml-deactivate-old-media-factory.php
[edit]
[-] class-wpml-global-ajax.php
[edit]
[+]
admin
[-] AutoAdjustIdsFactory.php
[edit]
[-] wpml-queried-object.php
[edit]
[-] class-wpml-wp-query-api.php
[edit]
[-] class-debug-backtrace.php
[edit]
[-] class-wpml-temporary-switch-admin-language.php
[edit]
[-] class-wpml-flags-factory.php
[edit]
[-] class-wpml-deactivate-old-media.php
[edit]
[-] AutoAdjustIds.php
[edit]
[-] Resources.php
[edit]
[-] class-wpml-encoding.php
[edit]
[-] class-wpml-temporary-switch-language.php
[edit]
[-] class-wpml-flags.php
[edit]
[+]
..
[-] Pager.php
[edit]
[-] class-wpml-wp-post.php
[edit]
[-] class-wpml-cache-factory.php
[edit]
[-] wpml-uuid.php
[edit]
[-] class-wpml-encoding-validation.php
[edit]
[-] wpml-languages-notices.php
[edit]
[-] class-wpml-non-persistent-cache.php
[edit]
[+]
user
[-] class-wpml-wp-cache.php
[edit]
[+]
lock
[-] class-wpml-simple-language-selector.php
[edit]
[-] class-wpml-debug-backtrace.php
[edit]
[-] class-wpml-wp-taxonomy-query.php
[edit]
[-] class-wpml-wp-cache-item.php
[edit]
[-] class-wpml-translate-link-targets.php
[edit]