From ca962a4c519179b2aae61cfe3fe4b212a9df2c27 Mon Sep 17 00:00:00 2001 From: skycel Date: Wed, 5 Feb 2025 02:08:27 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20-=20Ajout=20de=20la=20m=C3=A9thode?= =?UTF-8?q?=20`includes`=20pour=20charger=20des=20fichiers=20requis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomThemeTree.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CustomThemeTree.php b/CustomThemeTree.php index cb6e03d..8a0f220 100644 --- a/CustomThemeTree.php +++ b/CustomThemeTree.php @@ -52,6 +52,8 @@ class CustomThemeTree extends TemplateLoader { */ public function __construct() { + $this->includes(); + $this->theme = wp_get_theme(); $this->theme_directory = $this->theme->get_theme_root() . "/" . get_template(); $this->config_directory = "config"; @@ -76,6 +78,11 @@ class CustomThemeTree extends TemplateLoader { $this->init(); } + protected function includes(): void { + require_once __DIR__ . "/includes/custom-template.inc.php"; + require_once __DIR__ . "/includes/functions.inc.php"; + } + /** * Initializes custom directories, required files, and sets up template and component loaders. *