$66 GRAYBYTE WORDPRESS FILE MANAGER $14

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/itiministry.org/wp-content/plugins/give/src/MCP/Actions/

HOME
Current File : /home/bravrvjk/itiministry.org/wp-content/plugins/give/src/MCP/Actions//RegisterMCPServer.php
<?php declare(strict_types=1);

namespace Give\MCP\Actions;

use Give\Framework\Support\Facades\Scripts\ScriptAsset;

/**
 * Loads the GiveWP MCP server frontend assets into the dashboard.
 *
 * @since 4.9.0
 */
class RegisterMCPServer
{

    public const HANDLE = 'givewp-mcp-server';

    /**
     * Register the GiveWP MCP server into Elementor's Angie SDK if the Angie plugin
     * is activated and the user has access.
     *
     * @action wp_enqueue_scripts
     * @action admin_enqueue_scripts
     *
     * @since 4.9.0
     *
     * @return void
     */
    public function __invoke(): void
    {
        // The angie plugin isn't installed or activated.
        if ( ! defined('ANGIE_VERSION') ) {
            return;
        }

        // The current user doesn't have permission to use angie.
        if ( ! current_user_can( 'use_angie' ) ) {
            return;
        }

        // If we're not logged in, no reason to include this large script.
        if ( ! is_user_logged_in() ) {
            return;
        }

        $scriptAsset = ScriptAsset::get(GIVE_PLUGIN_DIR . 'build/angieMcp.asset.php');

        wp_register_script(
            self::HANDLE,
            GIVE_PLUGIN_URL . 'build/angieMcp.js',
            array_merge($scriptAsset['dependencies'], ['angie-app']),
            $scriptAsset['version'],
            true
        );

        wp_localize_script( self::HANDLE, 'GiveMcpServerOptions',
            [
                'adminUrl' => admin_url(),
            ]
        );

        wp_enqueue_script(self::HANDLE);
    }
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
7 Apr 2026 5.25 AM
bravrvjk / bravrvjk
0755
RegisterMCPServer.php
1.524 KB
17 Sep 2025 8.52 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF