From 71c5e13683cc291279afa5c3b95dab7b4cca3653 Mon Sep 17 00:00:00 2001 From: skycel Date: Wed, 5 Feb 2025 02:09:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20-=20Ajout=20de=20la=20documentat?= =?UTF-8?q?ion=20du=20plugin=20Custom=20Theme=20Tree=20(README.md)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e05117e --- /dev/null +++ b/README.md @@ -0,0 +1,162 @@ +# WordPress Custom Theme Tree + +A WordPress plugin that provides a structured and organized theme development environment with customizable directory structures. + +## Overview + +This plugin helps WordPress theme developers by implementing a standardized and customizable directory structure. It automatically creates and manages theme directories, handles templates, and provides a clean organization for your theme files. + +## Features + +- 🗂️ Organized directory structure for templates and assets +- 🔧 Customizable configuration +- 🚀 Automatic creation of required WordPress theme files +- 📁 Support for template subdirectories (archives, pages, components, etc.) +- 🎨 Dedicated assets organization +- 📌 Optional .gitkeep file management + +## Directory Structure + +By default, the plugin creates the following structure: + +``` +theme-root/ +├── assets/ +│ ├── js +│ ├── css +│ └── img +├── config/ +│ └── theme.php +├── templates/ +│ ├── archives +│ ├── attachments +│ ├── authors +│ ├── categories +│ ├── components +│ ├── dates +│ ├── pages +│ ├── singles +│ ├── tags +│ └── taxonomies +├── footer.php +├── functions.php +├── header.php +├── index.php +└── style.css +``` + + +## Installation + +There are three ways to install this plugin: + +### 1. Standard Plugin Installation + +1. Clone this repository into your WordPress plugins directory: +```bash +cd wp-content/plugins/ +git clone custom-theme-tree +``` +2. Activate the plugin through the WordPress admin interface + +### 2. Must-Use Plugin Installation + +1. Create the `mu-plugins` directory if it doesn't exist: +```bash +mkdir -p wp-content/mu-plugins +``` + +2. Copy or clone the plugin into the mu-plugins directory: +```bash +cd wp-content/mu-plugins/ +git clone custom-theme-tree +``` + +3. Create a loader file named `custom-theme-tree.php` in the mu-plugins root: +```php + custom-theme-tree +``` + +3. Add the following code to your theme's `functions.php`: +```php + "custom-templates", + "stylesheets" => "custom-assets", + "templates_subdirs" => [ + "custom-section" => "custom-section" + ] +); +``` + +## Requirements + +- WordPress 5.0 or higher +- PHP 8.0 or higher + +## License + +This project is licensed under the MIT License. \ No newline at end of file