403Webshell
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/public_html/wp-content/plugins/elementor-pro/modules/mcp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/delarice/public_html/wp-content/plugins/elementor-pro/modules/mcp/module.php
<?php

namespace ElementorPro\Modules\Mcp;

use Elementor\Modules\Mcp\Module as Core_Mcp_Module;
use Elementor\Modules\Mcp\Registry\Ability_Registry;
use Elementor\Plugin as CorePlugin;
use ElementorPro\Base\Module_Base;
use ElementorPro\Modules\Mcp\Abilities\List_Site_Parts_Ability;
use ElementorPro\Modules\Mcp\Abilities\Manage_Site_Parts_Ability;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Module extends Module_Base {

	public function get_name() {
		return 'mcp';
	}

	public static function is_active() {
		return function_exists( 'wp_register_ability' );
	}

	public function __construct() {
		parent::__construct();

		$registry = $this->get_core_registry();

		if ( $registry ) {
			$this->register_with_registry( $registry );
			return;
		}

		add_action( 'wp_abilities_api_init', [ $this, 'register_abilities_legacy' ] );
		add_filter( 'elementor/mcp/server/tools', [ $this, 'register_tool_slugs' ] );
	}

	public function register_abilities_legacy(): void {
		( new Manage_Site_Parts_Ability() )->register();
		( new List_Site_Parts_Ability() )->register();
	}

	public function register_tool_slugs( array $tools ): array {
		$tools[] = 'elementor/manage-site-parts';
		$tools[] = 'elementor/list-site-parts';

		return $tools;
	}

	private function register_with_registry( Ability_Registry $registry ): void {
		$registry->add( new Manage_Site_Parts_Ability() );
		$registry->add( new List_Site_Parts_Ability() );
	}

	private function get_core_registry(): ?Ability_Registry {
		if ( ! class_exists( Ability_Registry::class ) ) {
			return null;
		}

		$module = CorePlugin::$instance->modules_manager->get_modules( 'mcp' );

		if ( ! $module instanceof Core_Mcp_Module ) {
			return null;
		}

		return $module->registry();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit