🎉 - Début développement plugin CustomTreeFile

This commit is contained in:
Célian
2025-01-30 04:50:02 +01:00
commit a62549f1b4
6 changed files with 488 additions and 0 deletions

29
custom-theme-tree.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
/**
* Plugin Name: Embedded themes tree
* Description: Embed your theme tree files or custom as needed
* Version: 1.0.0
* Author: Skycel
* Author URI: https://skycel.me
*/
use Skycel\CustomTree\CustomThemeTree;
require_once __DIR__ . "/custom-template.php";
require_once __DIR__ . "/functions.php";
function test_plugin(): void {
if (!\defined('USE_CUSTOMTREE_PLUGIN') || USE_CUSTOMTREE_PLUGIN !== true) {
return;
}
if (!\defined("CUSTOMTREE") || !is_array(CUSTOMTREE)) {
new CustomThemeTree();
} else {
new CustomThemeTree(\CUSTOMTREE);
}
}
add_action("after_setup_theme", "test_plugin");
//new CustomThemeTree();