Add assets and wiki directories
This commit is contained in:
21
assets/css/admin.css
Normal file
21
assets/css/admin.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Admin styles for the plugin
|
||||
*/
|
||||
|
||||
.wpst-admin-container {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
border: 1px solid #ccd0d4;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.wpst-admin-header {
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.wpst-admin-header h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
12
assets/js/admin.js
Normal file
12
assets/js/admin.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Admin scripts for the plugin
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
$(document).ready(function() {
|
||||
// Plugin admin functionality will go here
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
13
wiki/Changelog.md
Normal file
13
wiki/Changelog.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
This page documents all notable changes to the WordPress Plugin Starter Template.
|
||||
|
||||
## Version 0.1.0 (2025-04-17)
|
||||
- Initial release with basic template structure
|
||||
- Added core plugin architecture with OOP approach
|
||||
- Added admin interface components and styling
|
||||
- Added update mechanism with multiple source options
|
||||
- Added documentation templates for users and developers
|
||||
- Added AI workflow documentation for AI-assisted development
|
||||
- Added GitHub Actions workflows for automated tasks
|
||||
- Added wiki documentation templates
|
||||
118
wiki/Frequently-Asked-Questions.md
Normal file
118
wiki/Frequently-Asked-Questions.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
This page answers common questions about the WordPress Plugin Starter Template.
|
||||
|
||||
## General Questions
|
||||
|
||||
### What is the WordPress Plugin Starter Template?
|
||||
|
||||
The WordPress Plugin Starter Template is a comprehensive starting point for developing WordPress plugins. It provides a well-structured codebase, documentation templates, and best practices to help you create high-quality WordPress plugins efficiently.
|
||||
|
||||
### Who is this template for?
|
||||
|
||||
This template is designed for:
|
||||
- WordPress plugin developers looking for a solid foundation
|
||||
- Developers who want to leverage AI assistance in their development workflow
|
||||
- Anyone who wants to create a WordPress plugin following best practices
|
||||
|
||||
### Is this template suitable for all types of plugins?
|
||||
|
||||
Yes, this template provides a solid foundation for most WordPress plugins. It's designed to be flexible and can be adapted for various types of plugins, from simple utilities to complex applications.
|
||||
|
||||
## Usage Questions
|
||||
|
||||
### How do I use this template?
|
||||
|
||||
This template is meant to be a starting point for your own plugin development. You should:
|
||||
|
||||
1. Copy the template files to your new plugin directory
|
||||
2. Rename files and update namespaces to match your plugin name
|
||||
3. Update plugin headers in the main PHP file
|
||||
4. Customize the functionality to meet your specific needs
|
||||
5. Update documentation to reflect your plugin's features
|
||||
|
||||
For detailed instructions, see the [Usage Instructions](Usage-Instructions) page.
|
||||
|
||||
### Do I need to keep the original credits?
|
||||
|
||||
While not strictly required, we appreciate if you keep a reference to the original template in your plugin's documentation. This helps others discover the template and contributes to the open-source community.
|
||||
|
||||
### Can I use this template for commercial plugins?
|
||||
|
||||
Yes, you can use this template for both free and commercial plugins. The template is licensed under GPL-2.0+, which allows for commercial use.
|
||||
|
||||
## Technical Questions
|
||||
|
||||
### What PHP version is required?
|
||||
|
||||
The template requires PHP 7.0 or higher, which is the minimum recommended version for WordPress plugins today.
|
||||
|
||||
### Does this template support Gutenberg blocks?
|
||||
|
||||
The template doesn't include Gutenberg blocks by default, but it provides a structure that makes it easy to add them. You can extend the template to include block registration and block-specific assets.
|
||||
|
||||
### How do I add custom post types or taxonomies?
|
||||
|
||||
To add custom post types or taxonomies:
|
||||
|
||||
1. Create a new class in `includes/` for your post type or taxonomy
|
||||
2. Register the post type or taxonomy in the class constructor
|
||||
3. Initialize the class in `includes/plugin.php`
|
||||
|
||||
### How do I handle plugin updates?
|
||||
|
||||
The template includes an update mechanism that supports multiple sources:
|
||||
|
||||
- WordPress.org
|
||||
- GitHub
|
||||
- Gitea
|
||||
|
||||
To configure the update mechanism:
|
||||
|
||||
1. Update the plugin headers in the main PHP file
|
||||
2. Customize the `updater.php` file if needed
|
||||
3. Ensure your repository follows the required structure for updates
|
||||
|
||||
## AI-Assisted Development Questions
|
||||
|
||||
### How does this template support AI-assisted development?
|
||||
|
||||
The template includes:
|
||||
|
||||
1. Detailed documentation in the `.ai-assistant.md` file
|
||||
2. Workflow guidelines in the `.ai-workflows/` directory
|
||||
3. Clear code structure and comments that help AI understand the codebase
|
||||
4. Best practices for AI-friendly code organization
|
||||
|
||||
### What AI tools work best with this template?
|
||||
|
||||
This template is designed to work well with various AI coding assistants, including:
|
||||
|
||||
- GitHub Copilot
|
||||
- Claude
|
||||
- ChatGPT
|
||||
- Other AI coding assistants
|
||||
|
||||
### How do I use the AI workflow documentation?
|
||||
|
||||
The AI workflow documentation in the `.ai-workflows/` directory provides guidelines for AI assistants working with this template. These files help ensure consistent, high-quality code and documentation when using AI tools for development.
|
||||
|
||||
## Contributing Questions
|
||||
|
||||
### How can I contribute to this template?
|
||||
|
||||
Contributions are welcome! Please feel free to:
|
||||
|
||||
1. Report bugs or issues
|
||||
2. Suggest new features or improvements
|
||||
3. Submit pull requests with bug fixes or enhancements
|
||||
|
||||
For more information, see the [Contributing](Contributing) page.
|
||||
|
||||
### Where can I report issues?
|
||||
|
||||
You can report issues on the [GitHub repository](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/issues).
|
||||
|
||||
### Is there a roadmap for future development?
|
||||
|
||||
Yes, we maintain a roadmap of planned features and improvements. You can find it in the [GitHub repository](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/projects).
|
||||
41
wiki/Home.md
Normal file
41
wiki/Home.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# WordPress Plugin Starter Template
|
||||
|
||||
Welcome to the documentation wiki for the WordPress Plugin Starter Template.
|
||||
|
||||
This template provides a solid foundation for developing WordPress plugins with best practices for AI-assisted development.
|
||||
|
||||
## Quick Links
|
||||
|
||||
- [Starter Prompt](Starter-Prompt)
|
||||
- [Installation Guide](Installation-Guide)
|
||||
- [Usage Instructions](Usage-Instructions)
|
||||
- [Frequently Asked Questions](Frequently-Asked-Questions)
|
||||
- [Contributing](Contributing)
|
||||
- [Changelog](Changelog)
|
||||
|
||||
## About This Template
|
||||
|
||||
The WordPress Plugin Starter Template is designed to help developers quickly create new WordPress plugins with a solid foundation of best practices. It incorporates modern coding standards, comprehensive documentation, and AI-assisted development workflows.
|
||||
|
||||
This template is based on the experience gained from developing the "Fix 'Plugin file does not exist' Notices" plugin and other successful WordPress plugins.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Object-Oriented Architecture**: Well-structured, maintainable code using OOP principles
|
||||
- **Namespace Support**: Modern PHP namespacing for better organization and avoiding conflicts
|
||||
- **Comprehensive Documentation**: Detailed documentation for both users and developers
|
||||
- **Testing Framework**: PHPUnit setup for unit testing
|
||||
- **Internationalization Ready**: Full support for translation and localization
|
||||
- **Update Source Selection**: Choose between WordPress.org, GitHub, or Gitea for plugin updates
|
||||
- **AI Workflow Documentation**: Detailed guides for AI-assisted development
|
||||
- **Wiki Documentation**: Ready-to-use wiki structure for comprehensive documentation
|
||||
|
||||
## Getting Started
|
||||
|
||||
To get started with this template, check out the [Starter Prompt](Starter-Prompt) for a comprehensive guide on customizing the template for your specific plugin needs.
|
||||
|
||||
**Important**: For the best AI assistance, add the .ai-assistant.md file and .ai-workflows/ directory to your AI IDE chat context. In most AI IDEs, you can pin these files to ensure they're considered in each message.
|
||||
|
||||
## Support
|
||||
|
||||
If you encounter any issues or have questions about the template, please check the [Frequently Asked Questions](Frequently-Asked-Questions) section. If you still need help, you can [open an issue](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/issues) on GitHub.
|
||||
81
wiki/Installation-Guide.md
Normal file
81
wiki/Installation-Guide.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Installation Guide
|
||||
|
||||
This guide provides instructions for installing and setting up the WordPress Plugin Starter Template.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before installing the plugin, ensure you have:
|
||||
|
||||
- WordPress 5.0 or higher
|
||||
- PHP 7.0 or higher
|
||||
- A WordPress site with administrator access
|
||||
|
||||
## Installation Methods
|
||||
|
||||
### Method 1: From WordPress.org (For Released Plugins)
|
||||
|
||||
1. Log in to your WordPress admin dashboard.
|
||||
2. Navigate to **Plugins > Add New**.
|
||||
3. Search for "WordPress Plugin Starter Template".
|
||||
4. Click **Install Now** next to the plugin.
|
||||
5. After installation, click **Activate**.
|
||||
|
||||
### Method 2: Manual Installation
|
||||
|
||||
1. Download the latest release from the [GitHub repository](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/releases).
|
||||
2. Log in to your WordPress admin dashboard.
|
||||
3. Navigate to **Plugins > Add New**.
|
||||
4. Click the **Upload Plugin** button at the top of the page.
|
||||
5. Click **Choose File** and select the downloaded ZIP file.
|
||||
6. Click **Install Now**.
|
||||
7. After installation, click **Activate**.
|
||||
|
||||
### Method 3: Using as a Template for Your Plugin
|
||||
|
||||
1. Clone or download the repository:
|
||||
```bash
|
||||
git clone https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding.git your-plugin-name
|
||||
```
|
||||
|
||||
2. Navigate to your plugin directory:
|
||||
```bash
|
||||
cd your-plugin-name
|
||||
```
|
||||
|
||||
3. Rename files and update namespaces:
|
||||
- Rename `wp-plugin-starter-template.php` to your plugin name (e.g., `your-plugin-name.php`)
|
||||
- Update the namespace from `WPALLSTARS\PluginStarterTemplate` to your own
|
||||
- Update text domain from `wp-plugin-starter-template` to your own
|
||||
|
||||
4. Update plugin headers in the main PHP file.
|
||||
|
||||
5. Install dependencies:
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
|
||||
6. Upload the plugin to your WordPress site or use the local development script:
|
||||
```bash
|
||||
./scripts/deploy-local.sh
|
||||
```
|
||||
|
||||
## Post-Installation
|
||||
|
||||
After installing and activating the plugin, you should:
|
||||
|
||||
1. Review the plugin settings (if applicable).
|
||||
2. Customize the plugin for your specific needs.
|
||||
3. Update documentation to reflect your plugin's features.
|
||||
|
||||
## Troubleshooting Installation Issues
|
||||
|
||||
If you encounter any issues during installation, please check the following:
|
||||
|
||||
1. **Plugin Conflicts**: Deactivate other plugins to check for conflicts.
|
||||
2. **Server Requirements**: Ensure your server meets the minimum requirements.
|
||||
3. **File Permissions**: Check that your WordPress installation has the correct file permissions.
|
||||
4. **Memory Limit**: Increase PHP memory limit if you encounter memory-related errors.
|
||||
|
||||
## Next Steps
|
||||
|
||||
After installation, refer to the [Usage Instructions](Usage-Instructions) to learn how to use and customize the plugin.
|
||||
190
wiki/Starter-Prompt.md
Normal file
190
wiki/Starter-Prompt.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# WordPress Plugin Starter Template - AI Assistant Prompt
|
||||
|
||||
This document provides a comprehensive prompt to help you get started with creating your own WordPress plugin using this starter template with the assistance of AI tools like GitHub Copilot, Claude, or ChatGPT.
|
||||
|
||||
## Important: Optimize AI Context
|
||||
|
||||
**Before starting, add the .ai-assistant.md file and .ai-workflows/ directory to your AI IDE chat context.** In most AI IDEs, you can pin these files to ensure they're considered in each message. This will help the AI understand the project structure and follow the established best practices.
|
||||
|
||||
## Initial Setup Prompt
|
||||
|
||||
Use the following prompt to guide the AI assistant in helping you set up your new plugin based on this template:
|
||||
|
||||
```
|
||||
I'm creating a new WordPress plugin based on the wp-plugin-starter-template-for-ai-coding template. Please help me customize this template for my specific plugin needs.
|
||||
|
||||
Here are the details for my new plugin:
|
||||
|
||||
- Plugin Name: [YOUR PLUGIN NAME]
|
||||
- Plugin Slug: [YOUR-PLUGIN-SLUG]
|
||||
- Text Domain: [your-plugin-text-domain]
|
||||
- Namespace: [VENDOR]\[PluginName]
|
||||
- Description: [BRIEF DESCRIPTION OF YOUR PLUGIN]
|
||||
- Version: 0.1.0 (starting version)
|
||||
- Author: [YOUR NAME/ORGANIZATION]
|
||||
- Author URI: [YOUR WEBSITE]
|
||||
- License: GPL-2.0+ (or specify another compatible license)
|
||||
- Requires WordPress: [MINIMUM WP VERSION, e.g., 5.0]
|
||||
- Requires PHP: [MINIMUM PHP VERSION, e.g., 7.0]
|
||||
- GitHub Repository: [YOUR GITHUB REPO URL]
|
||||
- Gitea Repository (if applicable): [YOUR GITEA REPO URL]
|
||||
|
||||
I need help with the following tasks:
|
||||
|
||||
1. Updating all template placeholders with my plugin information
|
||||
2. Customizing the plugin structure for my specific needs
|
||||
3. Setting up the initial functionality for my plugin
|
||||
|
||||
I've added the .ai-assistant.md and .ai-workflows/ directory to the chat context to ensure you have all the necessary information about the project structure and best practices.
|
||||
|
||||
Please guide me through this process step by step, starting with identifying all files that need to be updated with my plugin information.
|
||||
```
|
||||
|
||||
## Files That Need Updating
|
||||
|
||||
The AI will help you identify and update the following files with your plugin information:
|
||||
|
||||
1. **Main Plugin File**: Rename `wp-plugin-starter-template.php` to `your-plugin-slug.php` and update all plugin header information
|
||||
2. **README.md**: Update with your plugin details, features, and installation instructions
|
||||
3. **readme.txt**: Update WordPress.org plugin repository information
|
||||
4. **CHANGELOG.md**: Initialize with your starting version
|
||||
5. **composer.json**: Update package name and description
|
||||
6. **languages/pot file**: Rename and update the POT file
|
||||
7. **.github/workflows/**: Update GitHub Actions workflows with your repository information
|
||||
8. **.wiki/**: Update wiki documentation with your plugin information
|
||||
9. **.ai-assistant.md**: Update AI assistant guidance for your specific plugin
|
||||
10. **includes/plugin.php**: Update namespace and class references
|
||||
11. **includes/core.php**: Update namespace and customize core functionality
|
||||
12. **admin/lib/admin.php**: Update namespace and customize admin functionality
|
||||
|
||||
## Customization Process
|
||||
|
||||
After providing the initial information, follow this process with your AI assistant:
|
||||
|
||||
### 1. File Renaming
|
||||
|
||||
Ask the AI to help you identify all files that need to be renamed:
|
||||
|
||||
```
|
||||
Please list all files that need to be renamed to match my plugin slug, and provide the commands to rename them.
|
||||
```
|
||||
|
||||
### 2. Namespace Updates
|
||||
|
||||
Ask the AI to help you update all namespace references:
|
||||
|
||||
```
|
||||
Please help me update all namespace references from WPALLSTARS\PluginStarterTemplate to [VENDOR]\[PluginName] throughout the codebase.
|
||||
```
|
||||
|
||||
### 3. Text Domain Updates
|
||||
|
||||
Ask the AI to help you update all text domain references:
|
||||
|
||||
```
|
||||
Please help me update all text domain references from 'wp-plugin-starter-template' to '[your-plugin-text-domain]' throughout the codebase.
|
||||
```
|
||||
|
||||
### 4. Function Prefix Updates
|
||||
|
||||
Ask the AI to help you update any function prefixes:
|
||||
|
||||
```
|
||||
Please help me update any function prefixes from 'wpst_' to '[your_prefix]_' throughout the codebase.
|
||||
```
|
||||
|
||||
### 5. Customizing Core Functionality
|
||||
|
||||
Ask the AI to help you customize the core functionality for your specific plugin needs:
|
||||
|
||||
```
|
||||
Now I'd like to customize the core functionality for my plugin. Here's what my plugin should do:
|
||||
|
||||
[DESCRIBE YOUR PLUGIN'S CORE FUNCTIONALITY]
|
||||
|
||||
Please help me modify the includes/core.php file to implement this functionality.
|
||||
```
|
||||
|
||||
### 6. Customizing Admin Interface
|
||||
|
||||
Ask the AI to help you customize the admin interface for your specific plugin needs:
|
||||
|
||||
```
|
||||
I'd like to customize the admin interface for my plugin. Here's what I need in the admin area:
|
||||
|
||||
[DESCRIBE YOUR PLUGIN'S ADMIN INTERFACE NEEDS]
|
||||
|
||||
Please help me modify the admin/lib/admin.php file and any other necessary files to implement this.
|
||||
```
|
||||
|
||||
### 7. Testing Setup
|
||||
|
||||
Ask the AI to help you set up testing for your plugin:
|
||||
|
||||
```
|
||||
Please help me update the testing setup to match my plugin's namespace and functionality. I want to ensure I have proper test coverage for the core features.
|
||||
```
|
||||
|
||||
## Additional Customization Areas
|
||||
|
||||
Depending on your plugin's needs, you might want to ask the AI for help with:
|
||||
|
||||
1. **Custom Post Types**: Setting up custom post types and taxonomies
|
||||
2. **Settings API**: Implementing WordPress Settings API for your plugin options
|
||||
3. **Shortcodes**: Creating shortcodes for front-end functionality
|
||||
4. **Widgets**: Developing WordPress widgets
|
||||
5. **REST API**: Adding custom REST API endpoints
|
||||
6. **Blocks**: Creating Gutenberg blocks
|
||||
7. **Internationalization**: Ensuring proper i18n setup
|
||||
8. **Database Tables**: Creating custom database tables if needed
|
||||
9. **Cron Jobs**: Setting up WordPress cron jobs
|
||||
10. **User Roles and Capabilities**: Managing custom user roles and capabilities
|
||||
|
||||
## Final Review
|
||||
|
||||
Once you've completed the customization, ask the AI to help you review everything:
|
||||
|
||||
```
|
||||
Please help me review all the changes we've made to ensure:
|
||||
|
||||
1. All template placeholders have been replaced with my plugin information
|
||||
2. All namespaces, text domains, and function prefixes have been updated consistently
|
||||
3. The plugin structure matches my specific needs
|
||||
4. The initial functionality is properly implemented
|
||||
5. All documentation (README.md, readme.txt, wiki) is updated and consistent
|
||||
|
||||
Are there any issues or inconsistencies that need to be addressed?
|
||||
```
|
||||
|
||||
## Building and Testing
|
||||
|
||||
Finally, ask the AI to guide you through building and testing your plugin:
|
||||
|
||||
```
|
||||
Please guide me through the process of building and testing my plugin:
|
||||
|
||||
1. How do I use the build script to create a deployable version?
|
||||
2. What tests should I run to ensure everything is working correctly?
|
||||
3. How do I set up a local testing environment?
|
||||
4. What should I check before releasing the first version?
|
||||
```
|
||||
|
||||
## Optimizing AI Assistance
|
||||
|
||||
To ensure the AI assistant has all the necessary context about your plugin's structure and best practices:
|
||||
|
||||
```
|
||||
Please add the .ai-assistant.md and .ai-workflows/ directory to your AI IDE chat context. In most AI IDEs, you can pin these files to ensure they're considered in each message. This will help the AI understand the project structure and follow the established best practices.
|
||||
```
|
||||
|
||||
## Remember
|
||||
|
||||
- This template is designed to be a starting point. Feel free to add, remove, or modify components as needed for your specific plugin.
|
||||
- The AI assistant can help you understand the existing code and make appropriate modifications, but you should review all changes to ensure they meet your requirements.
|
||||
- Always test your plugin thoroughly before releasing it.
|
||||
- Keep documentation updated as you develop your plugin.
|
||||
- Pin the .ai-assistant.md and .ai-workflows/ files in your AI IDE chat to ensure the AI has the necessary context for each interaction.
|
||||
|
||||
## Credits
|
||||
|
||||
This plugin is based on the [WordPress Plugin Starter Template for AI Coding](https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding) by WPALLSTARS.
|
||||
121
wiki/Usage-Instructions.md
Normal file
121
wiki/Usage-Instructions.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# Usage Instructions
|
||||
|
||||
This guide provides instructions for using and customizing the WordPress Plugin Starter Template for your own plugin development.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
The WordPress Plugin Starter Template is designed to be a starting point for your WordPress plugin development. It provides a well-structured codebase that you can customize to create your own plugin.
|
||||
|
||||
### Template Structure
|
||||
|
||||
The template follows a modular structure:
|
||||
|
||||
- `wp-plugin-starter-template.php`: Main plugin file with plugin headers
|
||||
- `includes/`: Core plugin functionality
|
||||
- `plugin.php`: Main plugin class that initializes everything
|
||||
- `core.php`: Core functionality class
|
||||
- `updater.php`: Update mechanism for multiple sources
|
||||
- `admin/`: Admin-specific functionality
|
||||
- `lib/`: Admin classes
|
||||
- `css/`: Admin stylesheets
|
||||
- `js/`: Admin JavaScript files
|
||||
- `languages/`: Translation files
|
||||
- `.github/workflows/`: GitHub Actions workflows
|
||||
- `.ai-workflows/`: Documentation for AI assistants
|
||||
- `.wiki/`: Wiki documentation templates
|
||||
|
||||
### Customizing for Your Plugin
|
||||
|
||||
1. **Rename Files and Update Namespaces**:
|
||||
- Rename `wp-plugin-starter-template.php` to your plugin name
|
||||
- Update the namespace from `WPALLSTARS\PluginStarterTemplate` to your own
|
||||
- Update text domain from `wp-plugin-starter-template` to your own
|
||||
|
||||
2. **Update Plugin Headers**:
|
||||
- Edit the plugin headers in the main PHP file
|
||||
- Update GitHub/Gitea repository URLs
|
||||
|
||||
3. **Customize Functionality**:
|
||||
- Modify the core functionality in `includes/core.php`
|
||||
- Add your own classes as needed
|
||||
- Customize admin interfaces in the `admin/` directory
|
||||
|
||||
4. **Update Documentation**:
|
||||
- Update README.md and readme.txt with your plugin information
|
||||
- Customize wiki documentation in the `.wiki/` directory
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Adding Admin Pages
|
||||
|
||||
The template includes a structure for adding admin pages to the WordPress dashboard. To add an admin page:
|
||||
|
||||
1. Uncomment the `add_admin_menu` method in `admin/lib/admin.php`
|
||||
2. Customize the menu parameters to match your plugin
|
||||
3. Create the corresponding render method for your admin page
|
||||
4. Create template files in an `admin/templates/` directory
|
||||
|
||||
### Adding Settings
|
||||
|
||||
To add settings to your plugin:
|
||||
|
||||
1. Create a settings class in `includes/settings.php`
|
||||
2. Register settings using the WordPress Settings API
|
||||
3. Create form fields for your settings
|
||||
4. Handle settings validation and sanitization
|
||||
|
||||
### Adding Custom Post Types or Taxonomies
|
||||
|
||||
To add custom post types or taxonomies:
|
||||
|
||||
1. Create a new class in `includes/` for your post type or taxonomy
|
||||
2. Register the post type or taxonomy in the class constructor
|
||||
3. Initialize the class in `includes/plugin.php`
|
||||
|
||||
### Internationalization
|
||||
|
||||
The template is ready for internationalization. To make your plugin translatable:
|
||||
|
||||
1. Use translation functions for all user-facing strings:
|
||||
- `__()` for simple strings
|
||||
- `_e()` for echoed strings
|
||||
- `esc_html__()` for escaped strings
|
||||
2. Update the text domain in all translation functions
|
||||
3. Generate a POT file for translations
|
||||
|
||||
### Update Mechanism
|
||||
|
||||
The template includes an update mechanism that supports multiple sources:
|
||||
|
||||
- WordPress.org
|
||||
- GitHub
|
||||
- Gitea
|
||||
|
||||
To configure the update mechanism:
|
||||
|
||||
1. Update the plugin headers in the main PHP file
|
||||
2. Customize the `updater.php` file if needed
|
||||
3. Ensure your repository follows the required structure for updates
|
||||
|
||||
## Building and Releasing
|
||||
|
||||
The template includes scripts for building and releasing your plugin:
|
||||
|
||||
1. **Building the Plugin**:
|
||||
```bash
|
||||
./build.sh <version>
|
||||
```
|
||||
|
||||
2. **Deploying to a Local WordPress Installation**:
|
||||
```bash
|
||||
./scripts/deploy-local.sh
|
||||
```
|
||||
|
||||
3. **Creating a Release**:
|
||||
- Tag a new version in Git
|
||||
- Push the tag to GitHub
|
||||
- The GitHub Actions workflow will create a release
|
||||
|
||||
## Next Steps
|
||||
|
||||
After customizing the template for your needs, refer to the [Architecture Overview](Architecture-Overview) to understand the plugin's structure in more detail.
|
||||
20
wiki/_Sidebar.md
Normal file
20
wiki/_Sidebar.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## User Documentation
|
||||
* [Home](Home)
|
||||
* [Installation Guide](Installation-Guide)
|
||||
* [Usage Instructions](Usage-Instructions)
|
||||
* [Frequently Asked Questions](Frequently-Asked-Questions)
|
||||
* [Troubleshooting](Troubleshooting)
|
||||
|
||||
## Developer Documentation
|
||||
* [Architecture Overview](Architecture-Overview)
|
||||
* [Customization Guide](Customization-Guide)
|
||||
* [Extending the Plugin](Extending-the-Plugin)
|
||||
* [Coding Standards](Coding-Standards)
|
||||
* [Release Process](Release-Process)
|
||||
|
||||
## AI Documentation
|
||||
* [AI Workflow Documentation](AI-Workflow-Documentation)
|
||||
|
||||
## Additional Resources
|
||||
* [Changelog](Changelog)
|
||||
* [Contributing](Contributing)
|
||||
Reference in New Issue
Block a user