__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package Gantry5
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2021 RocketTheme, LLC
* @license GNU/GPLv2 and later
*
* http://www.gnu.org/licenses/gpl-2.0.html
*/
namespace Gantry\Framework;
use Gantry\Debugger;
use Pimple\ServiceProviderInterface;
use RocketTheme\Toolbox\Event\EventSubscriberInterface;
use Timber\Timber;
/**
* Class Gantry
* @package Gantry\Framework
*/
class Gantry extends Base\Gantry
{
/**
* @return boolean
*/
public function admin()
{
return \is_admin();
}
/**
* @param string $location
* @param bool $force
* @return array
*/
public function styles($location = 'head', $force = false)
{
// Do not display head, WordPress will take care of it (most of the time).
return !$force && $location === 'head' ? Document::$wp_styles : parent::styles($location);
}
/**
* @param string $location
* @param bool $force
* @return array
*/
public function scripts($location = 'head', $force = false)
{
// Do not display head and footer, WordPress will take care of it (most of the time).
return !$force && in_array($location, ['head', 'footer']) ? Document::$wp_scripts[$location] : parent::scripts($location);
}
/**
* @return static
* @throws \LogicException
*/
protected static function init()
{
// Make sure that Timber plugin is new enough or not installed.
if (class_exists('Timber', false) && empty(\Timber::$version)) {
$action = 'deactivate';
$slug = 'timber-library/timber.php';
throw new \LogicException('<strong>Timber Plugin</strong> is too old for <strong>Gantry 5</strong> and it is no longer needed. Click <a href="' . \wp_nonce_url(\add_query_arg(['action' => $action, 'plugin' => $slug], \admin_url( 'plugins.php')), 'deactivate-plugin_' . $slug) . '"><strong>here</strong></a> to deactivate it.');
}
$container = parent::init();
if (class_exists('TimberHelper')) {
// Using Timber plugin.
if (\GANTRY_DEBUGGER) {
Debugger::addMessage('Using Timber Plugin v' . Timber::$version);
}
} else {
// Using composer version of Timber; Initialize it.
new Timber;
if (\GANTRY_DEBUGGER) {
Debugger::addMessage('Using Timber Library v' . Timber::$version);
}
}
$lookup = $container['loader']->getPrefixesPsr4()['Gantry\\'];
$iterator = new \FilesystemIterator($lookup[0] . '/WordPress/Integration', \FilesystemIterator::SKIP_DOTS & \FilesystemIterator::UNIX_PATHS);
/** @var \FilesystemIterator $file */
foreach ($iterator as $file) {
if (!$file->isDir()) {
continue;
}
$class = "Gantry\\WordPress\\Integration\\{$file->getBasename()}\\{$file->getBasename()}";
if (class_exists($class) && call_user_func([$class, 'enabled'])) {
$integration = new $class;
if ($integration instanceof ServiceProviderInterface) {
$container->register($integration);
}
if ($integration instanceof EventSubscriberInterface) {
$container['events']->addSubscriber($integration);
}
}
}
return $container;
}
/**
* @return array
*/
protected function loadGlobal()
{
return (array) \get_option('gantry5_plugin');
}
}
| 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 |
|