Add folder structure documentation and standardize folder naming
This commit is contained in:
@ -17,6 +17,7 @@ Detailed workflow documentation is available in the `.ai-workflows/` directory:
|
|||||||
- **@.ai-workflows/bug-fixing.md**: Guidelines for identifying and fixing bugs
|
- **@.ai-workflows/bug-fixing.md**: Guidelines for identifying and fixing bugs
|
||||||
- **@.ai-workflows/code-review.md**: Standards for reviewing code changes
|
- **@.ai-workflows/code-review.md**: Standards for reviewing code changes
|
||||||
- **@.ai-workflows/feature-development.md**: Process for developing new features
|
- **@.ai-workflows/feature-development.md**: Process for developing new features
|
||||||
|
- **@.ai-workflows/folder-structure.md**: Documentation of the plugin's folder structure and naming conventions
|
||||||
- **@.ai-workflows/local-env-vars.md**: Local development environment paths and URLs
|
- **@.ai-workflows/local-env-vars.md**: Local development environment paths and URLs
|
||||||
- **@.ai-workflows/release-process.md**: Steps for preparing and publishing releases
|
- **@.ai-workflows/release-process.md**: Steps for preparing and publishing releases
|
||||||
|
|
||||||
|
59
.ai-workflows/folder-structure.md
Normal file
59
.ai-workflows/folder-structure.md
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# Folder Structure
|
||||||
|
|
||||||
|
This document outlines the folder structure of the plugin and explains the purpose of each directory.
|
||||||
|
|
||||||
|
## Root Directories
|
||||||
|
|
||||||
|
- **admin/** - Contains admin-specific functionality and assets
|
||||||
|
- **includes/** - Contains core plugin functionality and classes
|
||||||
|
- **languages/** - Contains translation files
|
||||||
|
- **scripts/** - Contains build and deployment scripts
|
||||||
|
- **.ai-workflows/** - Contains documentation for AI assistants
|
||||||
|
- **.github/** - Contains GitHub-specific files like workflows
|
||||||
|
- **.wordpress-org/** - Contains WordPress.org assets like banners and screenshots
|
||||||
|
|
||||||
|
## Admin Directory Structure
|
||||||
|
|
||||||
|
- **admin/css/** - Admin-specific CSS files
|
||||||
|
- **admin/js/** - Admin-specific JavaScript files
|
||||||
|
- **admin/images/** - Admin-specific images
|
||||||
|
- **admin/partials/** - Admin-specific template partials
|
||||||
|
- **admin/settings/** - Admin settings functionality
|
||||||
|
- **admin/tools/** - Admin tools functionality
|
||||||
|
- **admin/lib/** - Admin-specific library files and helper functions
|
||||||
|
|
||||||
|
## Includes Directory
|
||||||
|
|
||||||
|
The `includes/` directory contains the core plugin functionality:
|
||||||
|
|
||||||
|
- **includes/admin.php** - Admin class for handling admin-specific functionality
|
||||||
|
- **includes/core.php** - Core class for handling the main plugin functionality
|
||||||
|
- **includes/modal.php** - Modal class for handling the update source selector modal
|
||||||
|
- **includes/plugin.php** - Main plugin class that initializes all components
|
||||||
|
- **includes/updater.php** - Updater class for handling plugin updates
|
||||||
|
|
||||||
|
## File Naming Conventions
|
||||||
|
|
||||||
|
- All PHP files in the `includes/` directory use lowercase filenames
|
||||||
|
- All directories use lowercase names
|
||||||
|
- JavaScript and CSS files use kebab-case (e.g., `update-source-selector.js`)
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
1. **Unique Directory Names**: Each directory should have a unique name to avoid confusion
|
||||||
|
2. **Logical Organization**: Files should be organized logically by function
|
||||||
|
3. **Consistent Naming**: File and directory names should follow consistent naming conventions
|
||||||
|
4. **Clear Separation**: Admin functionality should be separate from core functionality
|
||||||
|
5. **Minimal Dependencies**: Files should have minimal dependencies on other files
|
||||||
|
|
||||||
|
## @mentions for AI Assistants
|
||||||
|
|
||||||
|
When referring to files or directories in AI conversations, use the following format:
|
||||||
|
|
||||||
|
- **@includes/plugin.php** - Main plugin class
|
||||||
|
- **@includes/core.php** - Core functionality
|
||||||
|
- **@includes/admin.php** - Admin functionality
|
||||||
|
- **@includes/modal.php** - Modal functionality
|
||||||
|
- **@includes/updater.php** - Updater functionality
|
||||||
|
- **@admin/js/update-source-selector.js** - Update source selector JavaScript
|
||||||
|
- **@admin/css/update-source-selector.css** - Update source selector CSS
|
@ -32,7 +32,7 @@ if (!defined('WPINC')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load the main plugin class
|
// Load the main plugin class
|
||||||
require_once plugin_dir_path(__FILE__) . 'includes/Plugin.php';
|
require_once plugin_dir_path(__FILE__) . 'includes/plugin.php';
|
||||||
|
|
||||||
// Initialize the plugin
|
// Initialize the plugin
|
||||||
new WPALLSTARS\FixPluginDoesNotExistNotices\Plugin(__FILE__, '2.2.2-stable');
|
new WPALLSTARS\FixPluginDoesNotExistNotices\Plugin(__FILE__, '2.2.2-stable');
|
||||||
|
Reference in New Issue
Block a user