| Server IP : 46.105.57.169 / Your IP : 216.73.216.144 Web Server : Apache System : Linux webd003.cluster120.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : maitricfuz ( 93378) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/maitricfuz/www/saint-martin-lg/plugins/system/jce/src/Extension/ |
Upload File : |
<?php
/**
* @package JCE
* @subpackage Editors.Jce
*
* @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Plugin\System\Jce\Extension;
use JLoader;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Plugin\System\Jce\PluginTraits\EventTrait;
use Joomla\Plugin\System\Jce\PluginTraits\FormTrait;
JLoader::register('WfBrowserHelper', JPATH_ADMINISTRATOR . '/components/com_jce/helpers/browser.php');
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* JCE WYSIWYG Editor Plugin.
*
* @since 1.5
*/
final class Jce extends CMSPlugin
{
use FormTrait;
use EventTrait;
/**
* Affects constructor behavior. If true, language files will be loaded automatically.
*
* @var boolean
*/
protected $autoloadLanguage = true;
private $booted = false;
private function bootEditorPlugins()
{
if ($this->booted) {
return;
}
$app = Factory::getApplication();
// only in "site"
if ($app->getClientId() !== 0) {
return;
}
$plugins = PluginHelper::getPlugin('jce');
foreach ($plugins as $plugin) {
if (!preg_match('/^editor[-_]/', $plugin->name)) {
continue;
}
$path = JPATH_PLUGINS . '/jce/' . $plugin->name;
// only modern plugins
if (!is_dir($path . '/src')) {
continue;
}
$plugin = $app->bootPlugin($plugin->name, $plugin->type);
$plugin->setDispatcher($app->getDispatcher());
$plugin->registerListeners();
}
$this->booted = true;
}
public function onAfterDispatch()
{
$app = Factory::getApplication();
// only in "site"
if ($app->getClientId() !== 0) {
return;
}
$document = Factory::getDocument();
// must be an html doctype
if ($document->getType() !== 'html') {
return true;
}
$this->bootEditorPlugins();
$app->triggerEvent('onWfPluginAfterDispatch');
}
}