@mytechtoday/augment-extensions 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/augment-extensions/domain-rules/wordpress/README.md +163 -0
- package/augment-extensions/domain-rules/wordpress/module.json +32 -0
- package/augment-extensions/domain-rules/wordpress/rules/coding-standards.md +617 -0
- package/augment-extensions/domain-rules/wordpress/rules/directory-structure.md +270 -0
- package/augment-extensions/domain-rules/wordpress/rules/file-patterns.md +423 -0
- package/augment-extensions/domain-rules/wordpress/rules/gutenberg-blocks.md +493 -0
- package/augment-extensions/domain-rules/wordpress/rules/performance.md +568 -0
- package/augment-extensions/domain-rules/wordpress/rules/plugin-development.md +510 -0
- package/augment-extensions/domain-rules/wordpress/rules/project-detection.md +251 -0
- package/augment-extensions/domain-rules/wordpress/rules/rest-api.md +501 -0
- package/augment-extensions/domain-rules/wordpress/rules/security.md +564 -0
- package/augment-extensions/domain-rules/wordpress/rules/theme-development.md +388 -0
- package/augment-extensions/domain-rules/wordpress/rules/woocommerce.md +441 -0
- package/augment-extensions/domain-rules/wordpress-plugin/README.md +139 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/ajax-plugin.md +1599 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/custom-post-type-plugin.md +1727 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/gutenberg-block-plugin.md +428 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/gutenberg-block.md +422 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/mvc-plugin.md +1623 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/object-oriented-plugin.md +1343 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/rest-endpoint.md +734 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/settings-page-plugin.md +1350 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/simple-procedural-plugin.md +503 -0
- package/augment-extensions/domain-rules/wordpress-plugin/examples/singleton-plugin.md +971 -0
- package/augment-extensions/domain-rules/wordpress-plugin/module.json +53 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/activation-hooks.md +770 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/admin-interface.md +874 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/ajax-handlers.md +629 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/asset-management.md +559 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/context-providers.md +709 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/cron-jobs.md +736 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/database-management.md +1057 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/documentation-standards.md +463 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/frontend-functionality.md +478 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/gutenberg-blocks.md +818 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/internationalization.md +416 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/migration.md +667 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/performance-optimization.md +878 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/plugin-architecture.md +693 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/plugin-structure.md +352 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/rest-api.md +818 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/scaffolding-workflow.md +624 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/security-best-practices.md +866 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/testing-patterns.md +1165 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/testing.md +414 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/vscode-integration.md +751 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/woocommerce-integration.md +949 -0
- package/augment-extensions/domain-rules/wordpress-plugin/rules/wordpress-org-submission.md +458 -0
- package/augment-extensions/examples/gutenberg-block-plugin/README.md +101 -0
- package/augment-extensions/examples/gutenberg-block-plugin/examples/testimonial-block.md +428 -0
- package/augment-extensions/examples/gutenberg-block-plugin/module.json +40 -0
- package/augment-extensions/examples/rest-api-plugin/README.md +98 -0
- package/augment-extensions/examples/rest-api-plugin/examples/task-manager-api.md +1299 -0
- package/augment-extensions/examples/rest-api-plugin/module.json +40 -0
- package/augment-extensions/examples/woocommerce-extension/README.md +98 -0
- package/augment-extensions/examples/woocommerce-extension/examples/product-customizer.md +763 -0
- package/augment-extensions/examples/woocommerce-extension/module.json +40 -0
- package/augment-extensions/workflows/wordpress-plugin/README.md +232 -0
- package/augment-extensions/workflows/wordpress-plugin/ai-prompts.md +839 -0
- package/augment-extensions/workflows/wordpress-plugin/bead-decomposition-patterns.md +854 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/complete-plugin-example.md +540 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/custom-post-type-example.md +1083 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/feature-addition-workflow.md +669 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/plugin-creation-workflow.md +597 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/secure-form-handler-example.md +925 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/security-audit-workflow.md +752 -0
- package/augment-extensions/workflows/wordpress-plugin/examples/wordpress-org-submission-workflow.md +773 -0
- package/augment-extensions/workflows/wordpress-plugin/module.json +49 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/best-practices.md +942 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/development-workflow.md +702 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/submission-workflow.md +728 -0
- package/augment-extensions/workflows/wordpress-plugin/rules/testing-workflow.md +775 -0
- package/cli/dist/cli.js +5 -1
- package/cli/dist/cli.js.map +1 -1
- package/cli/dist/commands/show.d.ts.map +1 -1
- package/cli/dist/commands/show.js +41 -0
- package/cli/dist/commands/show.js.map +1 -1
- package/modules.md +52 -0
- package/package.json +1 -1
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# WordPress.org Plugin Submission Guidelines
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document provides comprehensive guidelines for submitting plugins to the WordPress.org Plugin Directory, covering requirements, review process, SVN management, and best practices.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Pre-Submission Requirements
|
|
10
|
+
|
|
11
|
+
### 1. Plugin Readiness Checklist
|
|
12
|
+
|
|
13
|
+
Before submitting, ensure your plugin meets these requirements:
|
|
14
|
+
|
|
15
|
+
- [ ] **Unique functionality** - Not duplicating existing plugins
|
|
16
|
+
- [ ] **GPL-compatible license** - GPL-2.0+, GPL-3.0+, or compatible
|
|
17
|
+
- [ ] **No trademark violations** - Avoid trademarked names
|
|
18
|
+
- [ ] **Security best practices** - Sanitization, validation, escaping
|
|
19
|
+
- [ ] **WordPress coding standards** - Follow WPCS
|
|
20
|
+
- [ ] **Proper text domain** - Matches plugin slug
|
|
21
|
+
- [ ] **Translation ready** - All strings use i18n functions
|
|
22
|
+
- [ ] **No external dependencies** - No required paid services
|
|
23
|
+
- [ ] **No obfuscated code** - All code must be readable
|
|
24
|
+
- [ ] **readme.txt** - Complete and properly formatted
|
|
25
|
+
|
|
26
|
+
### 2. Required Files
|
|
27
|
+
|
|
28
|
+
**Minimum files:**
|
|
29
|
+
- Main plugin file with plugin header
|
|
30
|
+
- `readme.txt` (WordPress.org format)
|
|
31
|
+
|
|
32
|
+
**Recommended files:**
|
|
33
|
+
- `LICENSE` or `license.txt`
|
|
34
|
+
- `README.md` (for GitHub)
|
|
35
|
+
- `CHANGELOG.md` or changelog in readme.txt
|
|
36
|
+
|
|
37
|
+
### 3. Plugin Header Requirements
|
|
38
|
+
|
|
39
|
+
```php
|
|
40
|
+
<?php
|
|
41
|
+
/**
|
|
42
|
+
* Plugin Name: My Awesome Plugin
|
|
43
|
+
* Plugin URI: https://example.com/my-awesome-plugin
|
|
44
|
+
* Description: Brief description of what the plugin does
|
|
45
|
+
* Version: 1.0.0
|
|
46
|
+
* Author: Your Name
|
|
47
|
+
* Author URI: https://example.com
|
|
48
|
+
* License: GPL-2.0+
|
|
49
|
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
|
50
|
+
* Text Domain: my-awesome-plugin
|
|
51
|
+
* Domain Path: /languages
|
|
52
|
+
* Requires at least: 6.0
|
|
53
|
+
* Requires PHP: 7.4
|
|
54
|
+
*/
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 4. readme.txt Requirements
|
|
58
|
+
|
|
59
|
+
See [documentation-standards.md](./documentation-standards.md) for complete readme.txt format.
|
|
60
|
+
|
|
61
|
+
**Critical sections:**
|
|
62
|
+
- Plugin name and metadata
|
|
63
|
+
- Short description (max 150 characters)
|
|
64
|
+
- Detailed description
|
|
65
|
+
- Installation instructions
|
|
66
|
+
- FAQ section
|
|
67
|
+
- Changelog
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Submission Process
|
|
72
|
+
|
|
73
|
+
### Step 1: Create WordPress.org Account
|
|
74
|
+
|
|
75
|
+
1. Go to [wordpress.org/support/register.php](https://wordpress.org/support/register.php)
|
|
76
|
+
2. Create an account (required for plugin submission)
|
|
77
|
+
3. Verify your email address
|
|
78
|
+
|
|
79
|
+
### Step 2: Submit Plugin for Review
|
|
80
|
+
|
|
81
|
+
1. Go to [wordpress.org/plugins/developers/add/](https://wordpress.org/plugins/developers/add/)
|
|
82
|
+
2. Upload your plugin ZIP file
|
|
83
|
+
3. Provide plugin details:
|
|
84
|
+
- Plugin name
|
|
85
|
+
- Plugin description
|
|
86
|
+
- Plugin URL (if available)
|
|
87
|
+
4. Agree to guidelines
|
|
88
|
+
5. Submit for review
|
|
89
|
+
|
|
90
|
+
### Step 3: Wait for Review
|
|
91
|
+
|
|
92
|
+
- **Review time**: Typically 1-14 days (can vary)
|
|
93
|
+
- **Email notification**: You'll receive an email when reviewed
|
|
94
|
+
- **Possible outcomes**:
|
|
95
|
+
- **Approved**: SVN repository created
|
|
96
|
+
- **Rejected**: Email with reasons and required changes
|
|
97
|
+
|
|
98
|
+
### Step 4: Address Review Feedback
|
|
99
|
+
|
|
100
|
+
If rejected or changes requested:
|
|
101
|
+
|
|
102
|
+
1. Read the review email carefully
|
|
103
|
+
2. Make all required changes
|
|
104
|
+
3. Reply to the email with:
|
|
105
|
+
- Confirmation of changes made
|
|
106
|
+
- Explanation of any questions
|
|
107
|
+
4. Wait for re-review
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## SVN Repository Management
|
|
112
|
+
|
|
113
|
+
### Initial Setup
|
|
114
|
+
|
|
115
|
+
Once approved, you'll receive SVN repository access:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Checkout SVN repository
|
|
119
|
+
svn co https://plugins.svn.wordpress.org/your-plugin-slug your-plugin-slug
|
|
120
|
+
|
|
121
|
+
# Navigate to directory
|
|
122
|
+
cd your-plugin-slug
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Repository Structure
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
your-plugin-slug/
|
|
129
|
+
├── trunk/ # Development version
|
|
130
|
+
├── tags/ # Released versions
|
|
131
|
+
│ ├── 1.0.0/
|
|
132
|
+
│ ├── 1.0.1/
|
|
133
|
+
│ └── 1.1.0/
|
|
134
|
+
├── branches/ # Development branches (optional)
|
|
135
|
+
└── assets/ # Plugin directory assets
|
|
136
|
+
├── banner-772x250.png
|
|
137
|
+
├── banner-1544x500.png
|
|
138
|
+
├── icon-128x128.png
|
|
139
|
+
├── icon-256x256.png
|
|
140
|
+
└── screenshot-1.png
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### First Release
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Copy plugin files to trunk
|
|
147
|
+
cp -r /path/to/your/plugin/* trunk/
|
|
148
|
+
|
|
149
|
+
# Add files to SVN
|
|
150
|
+
cd trunk
|
|
151
|
+
svn add --force * --auto-props --parents --depth infinity -q
|
|
152
|
+
|
|
153
|
+
# Commit to trunk
|
|
154
|
+
svn ci -m "Initial commit of version 1.0.0"
|
|
155
|
+
|
|
156
|
+
# Create tag for version 1.0.0
|
|
157
|
+
svn cp trunk tags/1.0.0
|
|
158
|
+
svn ci -m "Tagging version 1.0.0"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Subsequent Releases
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Update trunk with new version
|
|
165
|
+
cd trunk
|
|
166
|
+
# Copy updated files
|
|
167
|
+
svn stat
|
|
168
|
+
svn add <new-files>
|
|
169
|
+
svn delete <removed-files>
|
|
170
|
+
svn ci -m "Update to version 1.1.0"
|
|
171
|
+
|
|
172
|
+
# Create new tag
|
|
173
|
+
svn cp trunk tags/1.1.0
|
|
174
|
+
svn ci -m "Tagging version 1.1.0"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Assets Management
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Add plugin assets
|
|
181
|
+
cd assets
|
|
182
|
+
svn add banner-772x250.png
|
|
183
|
+
svn add banner-1544x500.png
|
|
184
|
+
svn add icon-128x128.png
|
|
185
|
+
svn add icon-256x256.png
|
|
186
|
+
svn ci -m "Add plugin assets"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Asset Requirements:**
|
|
190
|
+
|
|
191
|
+
- **Banner**: 772×250px (required), 1544×500px (retina, optional)
|
|
192
|
+
- **Icon**: 128×128px (required), 256×256px (retina, optional)
|
|
193
|
+
- **Screenshots**: Any size, numbered (screenshot-1.png, screenshot-2.png, etc.)
|
|
194
|
+
- **Format**: PNG or JPG
|
|
195
|
+
- **File size**: Keep under 1MB per file
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Plugin Review Guidelines
|
|
200
|
+
|
|
201
|
+
### What Gets Approved
|
|
202
|
+
|
|
203
|
+
✅ **Unique functionality** - Solves a real problem
|
|
204
|
+
✅ **Clean code** - Follows WordPress coding standards
|
|
205
|
+
✅ **Secure code** - Proper sanitization, validation, escaping
|
|
206
|
+
✅ **GPL-compatible** - Open source license
|
|
207
|
+
✅ **No external dependencies** - Works standalone
|
|
208
|
+
✅ **Proper documentation** - Clear readme.txt
|
|
209
|
+
✅ **Translation ready** - All strings translatable
|
|
210
|
+
|
|
211
|
+
### What Gets Rejected
|
|
212
|
+
|
|
213
|
+
❌ **Trademark violations** - Using trademarked names without permission
|
|
214
|
+
❌ **Obfuscated code** - Encoded, minified, or unreadable code
|
|
215
|
+
❌ **Security issues** - SQL injection, XSS, CSRF vulnerabilities
|
|
216
|
+
❌ **Calling external services** - Without user consent
|
|
217
|
+
❌ **Phoning home** - Tracking without disclosure
|
|
218
|
+
❌ **Spam/SEO plugins** - Link injection, content spinning
|
|
219
|
+
❌ **Duplicate functionality** - Exact copy of existing plugin
|
|
220
|
+
❌ **Incomplete plugins** - "Coming soon" or placeholder plugins
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Security Requirements
|
|
225
|
+
|
|
226
|
+
### Data Sanitization
|
|
227
|
+
|
|
228
|
+
```php
|
|
229
|
+
// Sanitize text input
|
|
230
|
+
$text = sanitize_text_field($_POST['text']);
|
|
231
|
+
|
|
232
|
+
// Sanitize email
|
|
233
|
+
$email = sanitize_email($_POST['email']);
|
|
234
|
+
|
|
235
|
+
// Sanitize URL
|
|
236
|
+
$url = esc_url_raw($_POST['url']);
|
|
237
|
+
|
|
238
|
+
// Sanitize textarea
|
|
239
|
+
$textarea = sanitize_textarea_field($_POST['textarea']);
|
|
240
|
+
|
|
241
|
+
// Sanitize HTML
|
|
242
|
+
$html = wp_kses_post($_POST['html']);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Data Validation
|
|
246
|
+
|
|
247
|
+
```php
|
|
248
|
+
// Validate email
|
|
249
|
+
if (!is_email($email)) {
|
|
250
|
+
wp_die('Invalid email address');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Validate URL
|
|
254
|
+
if (!filter_var($url, FILTER_VALIDATE_URL)) {
|
|
255
|
+
wp_die('Invalid URL');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Validate nonce
|
|
259
|
+
if (!wp_verify_nonce($_POST['nonce'], 'my_action')) {
|
|
260
|
+
wp_die('Security check failed');
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Data Escaping
|
|
265
|
+
|
|
266
|
+
```php
|
|
267
|
+
// Escape HTML
|
|
268
|
+
echo esc_html($text);
|
|
269
|
+
|
|
270
|
+
// Escape attributes
|
|
271
|
+
echo '<input value="' . esc_attr($value) . '">';
|
|
272
|
+
|
|
273
|
+
// Escape URLs
|
|
274
|
+
echo '<a href="' . esc_url($url) . '">Link</a>';
|
|
275
|
+
|
|
276
|
+
// Escape JavaScript
|
|
277
|
+
echo '<script>var data = ' . wp_json_encode($data) . ';</script>';
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### SQL Queries
|
|
281
|
+
|
|
282
|
+
```php
|
|
283
|
+
// Use $wpdb->prepare() for all queries
|
|
284
|
+
global $wpdb;
|
|
285
|
+
|
|
286
|
+
$results = $wpdb->get_results(
|
|
287
|
+
$wpdb->prepare(
|
|
288
|
+
"SELECT * FROM {$wpdb->prefix}table WHERE id = %d AND name = %s",
|
|
289
|
+
$id,
|
|
290
|
+
$name
|
|
291
|
+
)
|
|
292
|
+
);
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Common Rejection Reasons
|
|
298
|
+
|
|
299
|
+
### 1. Security Issues
|
|
300
|
+
|
|
301
|
+
**Problem**: Unsanitized input, SQL injection, XSS vulnerabilities
|
|
302
|
+
|
|
303
|
+
**Solution**:
|
|
304
|
+
- Sanitize all input: `sanitize_text_field()`, `sanitize_email()`, etc.
|
|
305
|
+
- Validate all data before processing
|
|
306
|
+
- Escape all output: `esc_html()`, `esc_attr()`, `esc_url()`
|
|
307
|
+
- Use `$wpdb->prepare()` for all database queries
|
|
308
|
+
- Use nonces for form submissions
|
|
309
|
+
|
|
310
|
+
### 2. Calling External Services
|
|
311
|
+
|
|
312
|
+
**Problem**: Plugin calls external APIs without user consent
|
|
313
|
+
|
|
314
|
+
**Solution**:
|
|
315
|
+
- Disclose all external calls in readme.txt
|
|
316
|
+
- Provide opt-in mechanism for external services
|
|
317
|
+
- Document privacy implications
|
|
318
|
+
- Provide alternative if service is unavailable
|
|
319
|
+
|
|
320
|
+
### 3. Generic Function/Class Names
|
|
321
|
+
|
|
322
|
+
**Problem**: Function names like `init()`, `get_data()` conflict with other plugins
|
|
323
|
+
|
|
324
|
+
**Solution**:
|
|
325
|
+
- Prefix all functions: `my_plugin_init()`
|
|
326
|
+
- Use namespaces: `namespace MyPlugin;`
|
|
327
|
+
- Prefix class names: `class MyPlugin_Admin {}`
|
|
328
|
+
|
|
329
|
+
### 4. Including External Libraries
|
|
330
|
+
|
|
331
|
+
**Problem**: Including entire libraries when only small parts are used
|
|
332
|
+
|
|
333
|
+
**Solution**:
|
|
334
|
+
- Only include necessary code
|
|
335
|
+
- Use WordPress core functions when available
|
|
336
|
+
- Document why external library is needed
|
|
337
|
+
- Ensure library is GPL-compatible
|
|
338
|
+
|
|
339
|
+
### 5. Incomplete readme.txt
|
|
340
|
+
|
|
341
|
+
**Problem**: Missing required sections or improper formatting
|
|
342
|
+
|
|
343
|
+
**Solution**:
|
|
344
|
+
- Use [WordPress readme.txt validator](https://wordpress.org/plugins/developers/readme-validator/)
|
|
345
|
+
- Include all required sections
|
|
346
|
+
- Follow exact formatting guidelines
|
|
347
|
+
- Test with validator before submission
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Post-Approval Best Practices
|
|
352
|
+
|
|
353
|
+
### 1. Regular Updates
|
|
354
|
+
|
|
355
|
+
- Update `Tested up to` with each WordPress release
|
|
356
|
+
- Fix reported bugs promptly
|
|
357
|
+
- Add new features based on user feedback
|
|
358
|
+
- Keep dependencies up to date
|
|
359
|
+
|
|
360
|
+
### 2. Support Forum Monitoring
|
|
361
|
+
|
|
362
|
+
- Check support forum daily
|
|
363
|
+
- Respond to questions within 48 hours
|
|
364
|
+
- Mark resolved topics as resolved
|
|
365
|
+
- Create FAQ entries for common questions
|
|
366
|
+
|
|
367
|
+
### 3. Version Management
|
|
368
|
+
|
|
369
|
+
- Use semantic versioning (MAJOR.MINOR.PATCH)
|
|
370
|
+
- Update changelog for every release
|
|
371
|
+
- Test thoroughly before releasing
|
|
372
|
+
- Keep stable tag updated in readme.txt
|
|
373
|
+
|
|
374
|
+
### 4. Asset Updates
|
|
375
|
+
|
|
376
|
+
- Update screenshots when UI changes
|
|
377
|
+
- Refresh banner/icon if rebranding
|
|
378
|
+
- Keep assets optimized (< 1MB)
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Useful Resources
|
|
383
|
+
|
|
384
|
+
### Official Documentation
|
|
385
|
+
|
|
386
|
+
- [Plugin Developer Handbook](https://developer.wordpress.org/plugins/)
|
|
387
|
+
- [Plugin Review Guidelines](https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/)
|
|
388
|
+
- [SVN Guide](https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/)
|
|
389
|
+
- [readme.txt Validator](https://wordpress.org/plugins/developers/readme-validator/)
|
|
390
|
+
|
|
391
|
+
### Tools
|
|
392
|
+
|
|
393
|
+
- [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)
|
|
394
|
+
- [Plugin Check Plugin](https://wordpress.org/plugins/plugin-check/)
|
|
395
|
+
- [Query Monitor](https://wordpress.org/plugins/query-monitor/)
|
|
396
|
+
- [Debug Bar](https://wordpress.org/plugins/debug-bar/)
|
|
397
|
+
|
|
398
|
+
### Community
|
|
399
|
+
|
|
400
|
+
- [WordPress.org Support Forums](https://wordpress.org/support/forums/)
|
|
401
|
+
- [WordPress Slack](https://make.wordpress.org/chat/)
|
|
402
|
+
- [WordPress Developer Blog](https://developer.wordpress.org/news/)
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
## Troubleshooting
|
|
407
|
+
|
|
408
|
+
### Plugin Not Showing in Directory
|
|
409
|
+
|
|
410
|
+
**Possible causes:**
|
|
411
|
+
- Stable tag in readme.txt doesn't match tag in SVN
|
|
412
|
+
- Plugin header version doesn't match stable tag
|
|
413
|
+
- SVN commit failed
|
|
414
|
+
|
|
415
|
+
**Solution:**
|
|
416
|
+
```bash
|
|
417
|
+
# Verify stable tag in readme.txt
|
|
418
|
+
grep "Stable tag:" trunk/readme.txt
|
|
419
|
+
|
|
420
|
+
# Verify tag exists in SVN
|
|
421
|
+
svn list https://plugins.svn.wordpress.org/your-plugin/tags/
|
|
422
|
+
|
|
423
|
+
# Re-commit if needed
|
|
424
|
+
svn ci -m "Fix stable tag"
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Updates Not Appearing
|
|
428
|
+
|
|
429
|
+
**Possible causes:**
|
|
430
|
+
- Stable tag not updated in readme.txt
|
|
431
|
+
- Version in plugin header not updated
|
|
432
|
+
- Tag not created in SVN
|
|
433
|
+
|
|
434
|
+
**Solution:**
|
|
435
|
+
1. Update version in plugin header
|
|
436
|
+
2. Update stable tag in readme.txt
|
|
437
|
+
3. Commit to trunk
|
|
438
|
+
4. Create new tag in SVN
|
|
439
|
+
5. Wait 15-30 minutes for WordPress.org to update
|
|
440
|
+
|
|
441
|
+
### Assets Not Displaying
|
|
442
|
+
|
|
443
|
+
**Possible causes:**
|
|
444
|
+
- Wrong file names
|
|
445
|
+
- Wrong dimensions
|
|
446
|
+
- Files not in assets/ directory
|
|
447
|
+
|
|
448
|
+
**Solution:**
|
|
449
|
+
```bash
|
|
450
|
+
# Verify asset file names
|
|
451
|
+
svn list https://plugins.svn.wordpress.org/your-plugin/assets/
|
|
452
|
+
|
|
453
|
+
# Re-upload with correct names
|
|
454
|
+
cd assets
|
|
455
|
+
svn add banner-772x250.png
|
|
456
|
+
svn ci -m "Add banner"
|
|
457
|
+
```
|
|
458
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Gutenberg Block Plugin Examples
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Complete Gutenberg block plugin examples demonstrating modern WordPress block development with block.json, React components, InspectorControls, RichText, MediaUpload, and proper build process.
|
|
6
|
+
|
|
7
|
+
## Key Benefits
|
|
8
|
+
|
|
9
|
+
- **Modern Block Development**: Uses block.json and @wordpress/scripts
|
|
10
|
+
- **React Components**: Edit and Save components with hooks
|
|
11
|
+
- **Inspector Controls**: Settings panels with color pickers, range controls
|
|
12
|
+
- **Media Upload**: Image selection and management
|
|
13
|
+
- **Build Process**: Webpack configuration and npm scripts
|
|
14
|
+
- **Complete Examples**: Full working plugins ready to use
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
These are reference examples. Copy the code into your WordPress plugin project.
|
|
19
|
+
|
|
20
|
+
## Directory Structure
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
augment-extensions/examples/gutenberg-block-plugin/
|
|
24
|
+
├── module.json # Module metadata
|
|
25
|
+
├── README.md # This file
|
|
26
|
+
└── examples/
|
|
27
|
+
├── testimonial-block.md # Complete testimonial block plugin
|
|
28
|
+
├── call-to-action-block.md # CTA block with button
|
|
29
|
+
└── pricing-table-block.md # Pricing table with nested blocks
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Examples Included
|
|
33
|
+
|
|
34
|
+
### 1. Testimonial Block
|
|
35
|
+
Complete Gutenberg block with:
|
|
36
|
+
- RichText for content and author
|
|
37
|
+
- MediaUpload for author image
|
|
38
|
+
- RangeControl for rating
|
|
39
|
+
- ColorPicker for colors
|
|
40
|
+
- AlignmentToolbar
|
|
41
|
+
- Full build process
|
|
42
|
+
|
|
43
|
+
### 2. Call to Action Block
|
|
44
|
+
CTA block demonstrating:
|
|
45
|
+
- Button component
|
|
46
|
+
- Link controls
|
|
47
|
+
- Background image
|
|
48
|
+
- Gradient backgrounds
|
|
49
|
+
- Responsive settings
|
|
50
|
+
|
|
51
|
+
### 3. Pricing Table Block
|
|
52
|
+
Advanced block with:
|
|
53
|
+
- InnerBlocks for nested content
|
|
54
|
+
- Multiple pricing tiers
|
|
55
|
+
- Feature lists
|
|
56
|
+
- Custom block variations
|
|
57
|
+
- Block patterns
|
|
58
|
+
|
|
59
|
+
## Character Count
|
|
60
|
+
|
|
61
|
+
~45,000 characters
|
|
62
|
+
|
|
63
|
+
## Contents
|
|
64
|
+
|
|
65
|
+
- Complete plugin files (PHP, JS, CSS)
|
|
66
|
+
- Block.json configurations
|
|
67
|
+
- React Edit components
|
|
68
|
+
- Save components
|
|
69
|
+
- Build configurations
|
|
70
|
+
- Package.json with dependencies
|
|
71
|
+
- Webpack and Babel setup
|
|
72
|
+
- SCSS styles
|
|
73
|
+
- Translation setup
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Copy example to your project
|
|
79
|
+
cp -r examples/testimonial-block/ /path/to/wp-content/plugins/
|
|
80
|
+
|
|
81
|
+
# Install dependencies
|
|
82
|
+
cd /path/to/wp-content/plugins/testimonial-block
|
|
83
|
+
npm install
|
|
84
|
+
|
|
85
|
+
# Build
|
|
86
|
+
npm run build
|
|
87
|
+
|
|
88
|
+
# Development mode
|
|
89
|
+
npm start
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Related Modules
|
|
93
|
+
|
|
94
|
+
- `domain-rules/wordpress-plugin` - WordPress plugin development guidelines
|
|
95
|
+
- `workflows/wordpress-plugin` - WordPress plugin development workflow
|
|
96
|
+
- `coding-standards/react` - React coding standards
|
|
97
|
+
|
|
98
|
+
## Version History
|
|
99
|
+
|
|
100
|
+
- **1.0.0** (2026-01-26): Initial release with three complete examples
|
|
101
|
+
|