Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/blueversion/wp-content/plugins/unyson/framework/core/ |
Upload File : |
<?php if (!defined('FW')) die('Forbidden');
/**
* Main framework class that contains everything
*
* Convention: All public properties should be only instances of the components (except special property: manifest)
*/
final class _Fw
{
/** @var bool If already loaded */
private static $loaded = false;
/** @var FW_Framework_Manifest */
public $manifest;
/** @var _FW_Component_Extensions */
public $extensions;
/** @var _FW_Component_Backend */
public $backend;
/** @var _FW_Component_Theme */
public $theme;
public function __construct()
{
if (self::$loaded) {
trigger_error('Framework already loaded', E_USER_ERROR);
} else {
self::$loaded = true;
}
$fw_dir = fw_get_framework_directory();
// manifest
{
require $fw_dir .'/manifest.php';
/** @var array $manifest */
$this->manifest = new FW_Framework_Manifest($manifest);
add_action('fw_init', array($this, '_check_requirements'), 1);
}
// components
{
$this->extensions = new _FW_Component_Extensions();
$this->backend = new _FW_Component_Backend();
$this->theme = new _FW_Component_Theme();
}
}
/**
* @internal
*/
public function _check_requirements()
{
if (is_admin() && !$this->manifest->check_requirements()) {
FW_Flash_Messages::add(
'fw_requirements',
__('Framework requirements not met:', 'fw') .' '. $this->manifest->get_not_met_requirement_text(),
'warning'
);
}
}
}
/**
* @return _FW Framework instance
*/
function fw() {
static $FW = null; // cache
if ($FW === null) {
$FW = new _Fw();
}
return $FW;
}