Skip to content

Commit a3d62a2

Browse files
committed
feat(plugins): add composer.json and standardize versions to 0.1.0
1 parent 316fb36 commit a3d62a2

File tree

8 files changed

+74
-6
lines changed

8 files changed

+74
-6
lines changed

plugins/hwp-cli/composer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "wpengine/hwp-cli",
3+
"type": "wordpress-plugin",
4+
"description": "Command-line interface for Headless WordPress Toolkit",
5+
"license": "GPL-2.0-or-later",
6+
"version": "0.1.0",
7+
"authors": [
8+
{
9+
"name": "WP Engine",
10+
"email": "[email protected]",
11+
"homepage": "https://wpengine.com/"
12+
}
13+
],
14+
"require": {
15+
"php": "^7.4 || ^8.0"
16+
}
17+
}

plugins/hwp-cli/hwp-cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: HWP CLI Plugin
44
* Plugin URI: https://github.com/hwp/cli
55
* Description: Command-line interface for Headless WordPress Toolkit
6-
* Version: 1.0.0
6+
* Version: 0.1.0
77
* Author: HWP Team
88
* Author URI: https://github.com/hwp
99
* License: MIT
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "wpengine/hwp-cors-local",
3+
"type": "wordpress-plugin",
4+
"description": "Enables CORS headers for local headless WordPress development. Allows configurable frontend origins via HEADLESS_FRONTEND_URL constant.",
5+
"license": "GPL-2.0-or-later",
6+
"version": "0.1.0",
7+
"authors": [
8+
{
9+
"name": "WP Engine",
10+
"email": "[email protected]",
11+
"homepage": "https://wpengine.com/"
12+
}
13+
],
14+
"require": {
15+
"php": "^7.4 || ^8.0"
16+
}
17+
}

plugins/hwp-cors-local/hwp-cors-local.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: HWP CORS Local
44
* Plugin URI: https://github.com/wpengine/hwptoolkit
55
* Description: Enables CORS headers for local headless WordPress development. Allows configurable frontend origins via HEADLESS_FRONTEND_URL constant.
6-
* Version: 1.0.0
6+
* Version: 0.1.0
77
* Author: WP Engine
88
* Author URI: https://wpengine.com
99
* License: GPL-2.0-or-later
@@ -65,8 +65,8 @@ function add_cors_headers( $value ) {
6565
* Initialize the plugin
6666
*/
6767
function init() {
68-
// Only enable CORS in development environments
69-
if ( ! defined( 'WP_ENVIRONMENT_TYPE' ) || WP_ENVIRONMENT_TYPE === 'local' || WP_DEBUG ) {
68+
// Only enable CORS in local development environments
69+
if ( defined( 'WP_ENVIRONMENT_TYPE' ) && WP_ENVIRONMENT_TYPE === 'local' ) {
7070
add_action( 'rest_api_init', function() {
7171
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
7272
add_filter( 'rest_pre_serve_request', __NAMESPACE__ . '\\add_cors_headers' );
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "wpengine/hwp-frontend-links",
3+
"type": "wordpress-plugin",
4+
"description": "Adds \"View on Frontend\" links to WordPress admin for headless sites. Supports single or multiple frontends.",
5+
"license": "GPL-2.0-or-later",
6+
"version": "0.1.0",
7+
"authors": [
8+
{
9+
"name": "WP Engine",
10+
"email": "[email protected]",
11+
"homepage": "https://wpengine.com/"
12+
}
13+
],
14+
"require": {
15+
"php": "^7.4 || ^8.0"
16+
}
17+
}

plugins/hwp-frontend-links/hwp-frontend-links.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: HWP Frontend Links
44
* Plugin URI: https://github.com/wpengine/hwptoolkit
55
* Description: Adds "View on Frontend" links to WordPress admin for headless sites. Supports single or multiple frontends.
6-
* Version: 1.0.0
6+
* Version: 0.1.0
77
* Author: WP Engine
88
* Author URI: https://wpengine.com
99
* License: GPL-2.0-or-later
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "wpengine/hwp-wp-env-helpers",
3+
"type": "wordpress-plugin",
4+
"description": "Fixes for wp-env quirks. Forces REST API to use ?rest_route= format to avoid .htaccess issues.",
5+
"license": "GPL-2.0-or-later",
6+
"version": "0.1.0",
7+
"authors": [
8+
{
9+
"name": "WP Engine",
10+
"email": "[email protected]",
11+
"homepage": "https://wpengine.com/"
12+
}
13+
],
14+
"require": {
15+
"php": "^7.4 || ^8.0"
16+
}
17+
}

plugins/hwp-wp-env-helpers/hwp-wp-env-helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: HWP WP-Env Helpers
44
* Plugin URI: https://github.com/wpengine/hwptoolkit
55
* Description: Fixes for wp-env quirks. Forces REST API to use ?rest_route= format to avoid .htaccess issues.
6-
* Version: 1.0.0
6+
* Version: 0.1.0
77
* Author: WP Engine
88
* Author URI: https://wpengine.com
99
* License: GPL-2.0-or-later

0 commit comments

Comments
 (0)