Initial commit of WordPress Plugin Starter Template for AI Coding
Some checks failed
Tests / PHP 7.0 (push) Has been cancelled
Tests / PHP 7.4 (push) Has been cancelled
Tests / PHP 8.0 (push) Has been cancelled
Tests / Code Style (push) Has been cancelled
Sync Wiki / Sync Wiki to GitHub (push) Has been cancelled
Release / Build and Release (push) Has been cancelled
Some checks failed
Tests / PHP 7.0 (push) Has been cancelled
Tests / PHP 7.4 (push) Has been cancelled
Tests / PHP 8.0 (push) Has been cancelled
Tests / Code Style (push) Has been cancelled
Sync Wiki / Sync Wiki to GitHub (push) Has been cancelled
Release / Build and Release (push) Has been cancelled
This commit is contained in:
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).
|
35
.wiki/Home.md
Normal file
35
.wiki/Home.md
Normal file
@ -0,0 +1,35 @@
|
||||
# WordPress Plugin Starter Template
|
||||
|
||||
Welcome to the WordPress Plugin Starter Template wiki! This documentation provides comprehensive information about using, customizing, and extending the template for your WordPress plugin development.
|
||||
|
||||
## Overview
|
||||
|
||||
The WordPress Plugin Starter Template provides a solid foundation for developing WordPress plugins with AI assistance. It includes a well-structured codebase, documentation templates, and best practices to help you create high-quality WordPress plugins efficiently.
|
||||
|
||||
## For Users
|
||||
|
||||
- [Installation Guide](Installation-Guide): How to install and set up the plugin
|
||||
- [Usage Instructions](Usage-Instructions): How to use the plugin's features
|
||||
- [Frequently Asked Questions](Frequently-Asked-Questions): Common questions and answers
|
||||
- [Troubleshooting](Troubleshooting): Solutions to common issues
|
||||
|
||||
## For Developers
|
||||
|
||||
- [Architecture Overview](Architecture-Overview): Understanding the plugin's structure
|
||||
- [Customization Guide](Customization-Guide): How to customize the template for your needs
|
||||
- [Extending the Plugin](Extending-the-Plugin): Adding new features and functionality
|
||||
- [Coding Standards](Coding-Standards): Coding standards and best practices
|
||||
- [Release Process](Release-Process): How to create and publish releases
|
||||
|
||||
## For AI Assistants
|
||||
|
||||
- [AI Workflow Documentation](AI-Workflow-Documentation): Guidelines for AI-assisted development
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Changelog](Changelog): History of changes and updates
|
||||
- [Contributing](Contributing): How to contribute to the project
|
||||
|
||||
## Credits
|
||||
|
||||
This template is maintained by [WPALLSTARS](https://www.wpallstars.com) and is based on the experience and best practices developed while creating the [Fix 'Plugin file does not exist' Notices](https://github.com/wpallstars/wp-fix-plugin-does-not-exist-notices) plugin.
|
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.
|
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