2021-08-17 19:27:01 +00:00
|
|
|
<?php
|
2021-09-02 12:48:50 +00:00
|
|
|
/**
|
|
|
|
* @brief entryPhotoExifWidget, a plugin for Dotclear 2
|
2021-11-01 23:56:55 +00:00
|
|
|
*
|
2021-09-02 12:48:50 +00:00
|
|
|
* @package Dotclear
|
|
|
|
* @subpackage Plugin
|
2021-11-01 23:56:55 +00:00
|
|
|
*
|
2021-09-02 12:48:50 +00:00
|
|
|
* @author Jean-Christian Denis and contibutors
|
2021-11-01 23:56:55 +00:00
|
|
|
*
|
2021-09-02 12:48:50 +00:00
|
|
|
* @copyright Jean-Christian Denis
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2023-03-12 09:53:37 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Dotclear\Plugin\entryPhotoExifWidget;
|
|
|
|
|
|
|
|
use dcCore;
|
|
|
|
use dcNsProcess;
|
|
|
|
|
|
|
|
class Backend extends dcNsProcess
|
|
|
|
{
|
|
|
|
public static function init(): bool
|
|
|
|
{
|
|
|
|
self::$init = defined('DC_CONTEXT_ADMIN');
|
2021-08-17 19:27:01 +00:00
|
|
|
|
2023-03-12 09:53:37 +00:00
|
|
|
return self::$init;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function process(): bool
|
|
|
|
{
|
|
|
|
if (!self::$init) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
dcCore::app()->addBehavior('initWidgets', [Widgets::class, 'initWidgets']);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|