$49 GRAYBYTE WORDPRESS FILE MANAGER $36

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

/home/bravrvjk/dantho.rw/wp-content/plugins/extendify/app/Draft/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/extendify/app/Draft//Admin.php
<?php

/**
 * Admin.
 */

namespace Extendify\Draft;

defined('ABSPATH') || die('No direct access.');

use Extendify\Config;

/**
 * This class handles any file loading for the admin area.
 */

class Admin
{
    /**
     * Adds various actions to set up the page
     *
     * @return self|void
     */
    public function __construct()
    {
        \add_action('admin_init', [$this, 'loadScripts']);
    }

    /**
     * Adds scripts to the admin
     *
     * @return void
     */
    public function loadScripts()
    {
        add_action('enqueue_block_editor_assets', [$this, 'enqueueGutenbergAssets']);
    }

    /**
     * Enqueues Gutenberg stuff on a non-Gutenberg page.
     *
     * @return void
     */
    public function enqueueGutenbergAssets()
    {
        $currentScreen = get_current_screen();
        // Only load in the post editor.
        if ($currentScreen->base !== 'post') {
            return;
        }

        $version = constant('EXTENDIFY_DEVMODE') ? uniqid() : Config::$version;
        $scriptAssetPath = EXTENDIFY_PATH . 'public/build/' . Config::$assetManifest['extendify-draft.php'];
        $fallback = [
            'dependencies' => [],
            'version' => $version,
        ];

        $scriptAsset = file_exists($scriptAssetPath) ? require $scriptAssetPath : $fallback;
        foreach ($scriptAsset['dependencies'] as $style) {
            wp_enqueue_style($style);
        }

        \wp_enqueue_script(
            Config::$slug . '-draft-scripts',
            EXTENDIFY_BASE_URL . 'public/build/' . Config::$assetManifest['extendify-draft.js'],
            array_merge([Config::$slug . '-shared-scripts'], $scriptAsset['dependencies']),
            $scriptAsset['version'],
            true
        );

        \wp_set_script_translations(
            Config::$slug . '-draft-scripts',
            'extendify-local',
            EXTENDIFY_PATH . 'languages/js'
        );

        $version = constant('EXTENDIFY_DEVMODE') ? uniqid() : Config::$version;
        if (isset(Config::$assetManifest['extendify-draft.css'])) {
            \wp_enqueue_style(
                Config::$slug . '-draft-styles',
                EXTENDIFY_BASE_URL . 'public/build/' . Config::$assetManifest['extendify-draft.css'],
                [],
                $version,
                'all'
            );
        }
    }
}


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
Controllers
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
Admin.php
2.303 KB
23 Oct 2025 8.20 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF