| Server IP : 108.167.142.43 / Your IP : 216.73.217.58 Web Server : Apache System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : delarice ( 2406) PHP Version : 8.3.36 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home2/delarice/www/wp-content/plugins/elementor/core/frontend/ |
Upload File : |
<?php
namespace Elementor\Core\Frontend;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Widget_Content_Render_Mode {
const NORMAL = 'normal';
const MARKDOWN = 'markdown';
private static $current_mode = self::NORMAL;
public static function get_current(): string {
return self::$current_mode;
}
public static function set_current( string $mode ): void {
self::$current_mode = $mode;
}
public static function is( string $mode ): bool {
return self::get_current() === $mode;
}
public static function execute_as( string $mode, callable $callback ) {
$previous_mode = self::get_current();
$should_reset = $previous_mode !== $mode;
if ( $should_reset ) {
self::set_current( $mode );
}
try {
return $callback();
} finally {
if ( $should_reset ) {
self::set_current( $previous_mode );
}
}
}
}