/home/vianto5/.trash/cititower.mx/wp-content/plugins/sitepress-multilingual-cms/inc
NameSizeModeActions
absolute-links/-0755rm
actions/-0755rm
core/-0755rm
hacks/-0755rm
local-translation/-0755rm
post-translation/-0755rm
query-filtering/-0755rm
setup/-0755rm
taxonomy-term-translation/-0755rm
tools/-0755rm
translation-jobs/-0755rm
translation-management/-0755rm
translation-proxy/-0755rm
upgrade-functions/-0755rm
url-handling/-0755rm
utilities/-0755rm
wp-nav-menus/-0755rm
wpml-config/-0755rm
ajax.php2330644editdlrm
cache.php44600644editdlrm
constants-tm.php13660644editdlrm
constants.php66950644editdlrm
deprecated-hooks.php2610644editdlrm
functions-debug-information.php1220644editdlrm
functions-helpers.php11900644editdlrm
functions-load-tm.php267030644editdlrm
functions-load.php139880644editdlrm
functions-network.php41630644editdlrm
functions-sanitation.php19540644editdlrm
functions-security.php22420644editdlrm
functions-troubleshooting.php68530644editdlrm
functions.php268620644editdlrm
hacks.php9820644editdlrm
icl-admin-notifier.php290910644editdlrm
import-xml.php14750644editdlrm
js-scripts.php6400644editdlrm
js-tm-scripts.php31310644editdlrm
lang-data.php90220644editdlrm
language-switcher.php24160644editdlrm
not-compatible-plugins.php20490644editdlrm
plugin-integration-nextgen.php18540644editdlrm
plugins-integration.php20700644editdlrm
template-functions.php484270644editdlrm
upgrade.php106950644editdlrm
wpml-api.php197480644editdlrm
wpml-post-comments.class.php64800644editdlrm
wpml-post-edit-ajax.class.php108590644editdlrm
wpml-private-actions-tm.php36520644editdlrm
wpml-private-actions.php33830644editdlrm
wpml-private-filters.php10490644editdlrm
wpml_load_request_handler.php15470644editdlrm
wpml_zip.php235980644editdlrm
Edit: /home/vianto5/.trash/cititower.mx/wp-content/plugins/sitepress-multilingual-cms/inc/cache.php (4460B)
data = []; $this->name = $name; $this->cache_to_option = $cache_to_option; $this->cache_needs_saving = false; $this->init(); } public function init() { if ( $this->cache_to_option ) { $this->data = icl_cache_get( $this->name . '_cache_class' ); if ( false === $this->data ) { $this->data = []; } add_action( 'shutdown', [ $this, 'save_cache_if_required' ] ); } } public function save_cache_if_required() { if ( $this->cache_needs_saving ) { icl_cache_set( $this->name . '_cache_class', $this->data ); $this->cache_needs_saving = false; } } public function get( $key ) { if ( ICL_DISABLE_CACHE ) { return null; } return isset( $this->data[ $key ] ) ? $this->data[ $key ] : false; } public function has_key( $key ) { if ( ICL_DISABLE_CACHE ) { return false; } return array_key_exists( $key, (array) $this->data ); } public function set( $key, $value ) { if ( ICL_DISABLE_CACHE ) { return; } if ( $this->cache_to_option ) { $old_value = null; if ( isset( $this->data[ $key ] ) ) { $old_value = $this->data[ $key ]; } if ( $old_value !== $value ) { $this->data[ $key ] = $value; $this->cache_needs_saving = true; } } else { $this->data[ $key ] = $value; } } public function clear() { $this->data = array(); if ( $this->cache_to_option ) { icl_cache_clear( $this->name . '_cache_class' ); } } } if ( ! function_exists( 'icl_disable_cache' ) ) { function icl_disable_cache() { return defined( 'ICL_DISABLE_CACHE' ) && ICL_DISABLE_CACHE; } } if ( ! function_exists( 'icl_cache_get' ) ) { function icl_cache_get( $key ) { $result = false; if ( ! icl_disable_cache() ) { $icl_cache = get_option( '_icl_cache' ); $result = isset( $icl_cache[ $key ] ) ? $icl_cache[ $key ] : false; } return $result; } } if ( ! function_exists( 'icl_cache_set' ) ) { function icl_cache_set( $key, $value = null ) { global $switched; if ( empty( $switched ) && ! icl_disable_cache() ) { $icl_cache = get_option( '_icl_cache' ); if ( false === $icl_cache ) { $icl_cache = []; delete_option( '_icl_cache' ); } if ( ! isset( $icl_cache[ $key ] ) || $icl_cache[ $key ] !== $value ) { if ( ! is_null( $value ) ) { $icl_cache[ $key ] = $value; } elseif ( isset( $icl_cache[ $key ] ) ) { unset( $icl_cache[ $key ] ); } update_option( '_icl_cache', $icl_cache, 'no' ); } } } } if ( ! function_exists( 'icl_cache_clear' ) ) { function icl_cache_clear( $key = false, $key_as_prefix = false ) { if ( ! icl_disable_cache() ) { /** * @var WPML_Term_Translation $wpml_term_translations * @var WPML_Post_Translation $wpml_post_translations */ global $wpml_term_translations, $wpml_post_translations; $wpml_term_translations->reload(); $wpml_post_translations->reload(); if ( false === $key ) { delete_option( '_icl_cache' ); } else { /** @var array $icl_cache */ $icl_cache = get_option( '_icl_cache' ); if ( is_array( $icl_cache ) ) { if ( isset( $icl_cache[ $key ] ) ) { unset( $icl_cache[ $key ] ); } if ( $key_as_prefix ) { $cache_keys = array_keys( $icl_cache ); foreach ( $cache_keys as $cache_key ) { if ( strpos( $cache_key, $key ) === 0 ) { unset( $icl_cache[ $cache_key ] ); } } } // Special cache of 'per language' - clear different statuses. if ( false !== strpos( $key, '_per_language' ) ) { foreach ( $icl_cache as $k => $v ) { if ( false !== strpos( $k, $key . '#' ) ) { unset( $icl_cache[ $k ] ); } } } update_option( '_icl_cache', $icl_cache, 'no' ); } } } do_action( 'wpml_cache_clear' ); } } function w3tc_translate_cache_key_filter( $key ) { global $sitepress; return $sitepress->get_current_language() . $key; }