__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package   Gantry5
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2022 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */

namespace Gantry\Framework;

use Gantry\Component\Content\Document\HtmlDocument;

/**
 * Class Document
 * @package Gantry\Framework
 */
class Document extends HtmlDocument
{
    /** @var array */
    public static $wp_styles = [];
    /** @var array */
    public static $wp_scripts = ['head' => [], 'footer' => []];

    /** @var array */
    protected static $script_info = [];
    /** @var array */
    protected static $availableFrameworks = [
        'jquery' => 'registerJquery',
        'jquery.framework' => 'registerJquery',
        'jquery.ui.core' => 'registerJqueryUiCore',
        'jquery.ui.sortable' => 'registerJqueryUiSortable',
        'bootstrap.2' => 'registerBootstrap2',
        'bootstrap.3' => 'registerBootstrap3',
        'bootstrap.4' => 'registerBootstrap4',
        'bootstrap.5' => 'registerBootstrap5',
        'mootools' => 'registerMootools',
        'mootools.framework' => 'registerMootools',
        'mootools.core' => 'registerMootools',
        'mootools.more' => 'registerMootoolsMore',
        'lightcase' => 'registerLightcase',
        'lightcase.init' => 'registerLightcaseInit',
    ];

    public static function registerAssets()
    {
        static::registerFrameworks();
        static::registerStyles();
        static::registerScripts('head');
        static::registerScripts('footer');
    }

    public static function registerStyles()
    {
        $styles = static::$stack[0]->getStyles();

        foreach ($styles as $style) {
            switch ($style[':type']) {
                case 'file':
                    $array = explode('?', $style['href']);
                    $href = array_shift($array);
                    $version = array_shift($array) ?: false;
                    $name = isset($style['id']) ? $style['id'] : Gantry::basename($href, '.css');
                    if (strpos($version, '=')) {
                        $href .= '?' . $version;
                        $version = null;
                    }
                    \wp_enqueue_style($name, $href, [], $version, $style['media']);
                    break;
                case 'inline':
                    $type = !empty($style['type']) ? $style['type'] : 'text/css';
                    self::$wp_styles[] = "<style type=\"{$type}\">{$style['content']}</style>";
                    break;
            }
        }

        static::$stack[0]->clearStyles();
    }

    /**
     * @param string $pos
     */
    public static function registerScripts($pos)
    {
        $scripts = static::$stack[0]->getScripts($pos);
        $in_footer = ($pos !== 'head');

        foreach ($scripts as $script) {
            switch ($script[':type']) {
                case 'file':
                    $array = explode('?', $script['src']);
                    $src = array_shift($array);
                    $version = array_shift($array) ?: false;
                    $name = Gantry::basename($src, '.js');
                    if (!empty($script['handle'])) {
                        $name = $script['handle'];
                    }
                    self::$script_info[$name] = $script;
                    if (strpos($version, '=')) {
                        $src .= '?' . $version;
                        $version = null;
                    }
                    \wp_enqueue_script($name, $src, [], $version, $in_footer);
                    break;
                case 'inline':
                    $type = !empty($script['type']) ? $script['type'] : 'text/javascript';
                    self::$wp_scripts[$pos][] = "<script type=\"{$type}\">{$script['content']}</script>";
                    break;
            }
        }

        static::$stack[0]->clearScripts($pos);
    }

    /**
     * @param bool|null $addDomain
     * @return string
     */
    public static function domain($addDomain = null)
    {
        static $domain;

        if (!isset($domain)) {
            $url = \get_site_url();
            $components = parse_url($url);

            $scheme = isset($components['scheme']) ? $components['scheme'] . '://' : '';
            $host = isset($components['host']) ? $components['host'] : '';
            $port = isset($components['port']) ? ':' . $components['port'] : '';
            $user = isset($components['user']) ? $components['user'] : '';
            $pass = isset($components['pass']) ? ':' . $components['pass']  : '';
            $pass = ($user || $pass) ? "$pass@" : '';
            $domain = $scheme . $user . $pass . $host . $port;
        }

        // Always append domain in WP (unless told otherwise).
        return $addDomain !== false ? $domain : '';
    }

    /**
     * @return string
     */
    public static function siteUrl()
    {
        return \get_site_url();
    }

    /**
     * @return string
     */
    public static function rootUri()
    {
        static $path;

        if (!isset($path)) {
            // Support for WordPress core files stored in a non-root directory.
            $url = defined('WP_HOME') && WP_HOME ? WP_HOME : \get_site_url();
            $components = parse_url($url);

            $path = !empty($components['path']) ? $components['path'] : '/';
        }

        return $path;
    }

    /**
     * @param string $tag
     * @param string $handle
     * @return string
     */
    public static function script_add_attributes($tag, $handle)
    {
        if (!isset(self::$script_info[$handle])) {
            return $tag;
        }

        $script = self::$script_info[$handle];

        $append = [];
        if ($script['defer']) {
            $append[] = 'defer="defer"';
        }
        if ($script['async']) {
            $append[] = 'async="async"';
        }

        if (!$append) {
            return $tag;
        }

        $append = implode(' ', $append);

        return str_replace(' src=', " {$append} src=", $tag);
    }

    protected static function registerJquery()
    {
        \wp_enqueue_script('jquery');
    }

    protected static function registerJqueryUiCore()
    {
        \wp_enqueue_script('jquery-ui-core');
    }

    protected static function registerJqueryUiSortable()
    {
        \wp_enqueue_script('jquery-ui-sortable');
    }

    protected static function registerBootstrap2()
    {
        \wp_enqueue_script('bootstrap', 'https://maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js');
    }

    protected static function registerBootstrap3()
    {
        \wp_enqueue_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js');
    }

    protected static function registerBootstrap4()
    {
        \wp_enqueue_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js');
    }

    protected static function registerBootstrap5()
    {
        \wp_enqueue_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js');
    }

    protected static function registerMootools()
    {
        \wp_enqueue_script('mootools', 'https://cdnjs.cloudflare.com/ajax/libs/mootools/1.5.2/mootools-core-compat.min.js');
    }

    protected static function registerMootoolsMore()
    {
        \wp_enqueue_script('mootools-more', 'https://cdnjs.cloudflare.com/ajax/libs/mootools-more/1.5.2/mootools-more-compat-compressed.js');
    }
}

Filemanager

Name Type Size Permission Actions
Base Folder 0775
Markdown Folder 0775
Services Folder 0775
Assignments.php File 2.02 KB 0775
Atoms.php File 9.32 KB 0775
Configurations.php File 472 B 0775
Document.php File 7.37 KB 0775
Exception.php File 1.16 KB 0775
Exporter.php File 478 B 0775
Gantry.php File 3.56 KB 0775
Importer.php File 492 B 0775
Menu.php File 19.96 KB 0775
OutlineChooser.php File 324 B 0775
Outlines.php File 911 B 0775
Page.php File 2.26 KB 0775
Platform.php File 10.84 KB 0775
Positions.php File 558 B 0775
Request.php File 962 B 0775
Site.php File 577 B 0775
Theme.php File 21.46 KB 0775
ThemeInstaller.php File 710 B 0775
Translator.php File 1.68 KB 0775
Filemanager