| Server IP : 144.76.79.100 / Your IP : 216.73.216.103 [ Web Server : Apache System : Linux ch05.wehostwebserver.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64 User : razzlestore ( 1092) PHP Version : 8.2.29 Disable Function : NONE Domains : 343 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/razzlestore/www/wp-content/plugins/elementor/modules/atomic-widgets/ |
Upload File : |
<?php
namespace Elementor\Modules\AtomicWidgets;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Render_Context {
private static $context_stack = [];
public static function push( string $key, array $context ): void {
if ( ! self::get( $key ) ) {
self::$context_stack[ $key ] = [];
}
self::$context_stack[ $key ][] = $context;
}
public static function pop( string $key ): void {
if ( isset( self::$context_stack[ $key ] ) && ! empty( self::$context_stack[ $key ] ) ) {
array_pop( self::$context_stack[ $key ] );
}
}
public static function get( string $key ): array {
if ( ! isset( self::$context_stack[ $key ] ) || empty( self::$context_stack[ $key ] ) ) {
return [];
}
$last_key = array_key_last( self::$context_stack[ $key ] );
return self::$context_stack[ $key ][ $last_key ];
}
public static function clear(): void {
self::$context_stack = [];
}
}