Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/update_composer_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ usage() {
echo " description - Optional: Package description (uses generic default if not provided)"
echo ""
echo "Examples:"
echo " $0 '0.0.2' 'https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.2/wp-graphql-webhooks.zip'"
echo " $0 '0.0.2' 'https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.2/wpgraphql-webhooks.zip'"
echo ""
echo " With custom package name and description:"
echo " $0 '0.0.5' 'https://example.com/plugin.zip' 'wpengine/my-plugin' 'My custom plugin description'"
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/install-toolkit-plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Copy and use this example as your `composer.json` for a typical WordPress projec
],
"require": {
"wpengine/hwp-previews": "*",
"wpengine/wp-graphql-webhooks": "*"
"wpengine/wpgraphql-webhooks": "*"
},
"config": {
"allow-plugins": {
Expand Down Expand Up @@ -57,7 +57,7 @@ Copy and use this example as your `composer.json` for a typical WordPress projec
To update to the latest version:

```bash
composer update wpengine/hwp-previews wpengine/wp-graphql-webhooks
composer update wpengine/hwp-previews wpengine/wpgraphql-webhooks
```

---
Expand Down
2 changes: 1 addition & 1 deletion plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WordPress plugins for the Headless WordPress Toolkit. Each plugin is paired with
| Plugin | Description |
|--------|-------------|
| [`hwp-previews`](./hwp-previews/README.md) | Headless Previews solution for WordPress: fully configurable preview URLs via the settings page which is framework agnostic. |
| [`wp-graphql-webhooks`](./wp-graphql-webhooks/README.md) | A WordPress plugin that extends [WPGraphQL](https://www.wpgraphql.com/) to support webhook subscriptions and dispatching for headless WordPress environments. This allows external applications to listen and respond to WordPress content changes through GraphQL-driven webhook events. |
| [`wpgraphql-webhooks`](./wpgraphql-webhooks/README.md) | A WordPress plugin that extends [WPGraphQL](https://www.wpgraphql.com/) to support webhook subscriptions and dispatching for headless WordPress environments. This allows external applications to listen and respond to WordPress content changes through GraphQL-driven webhook events. |


## Install
Expand Down
14 changes: 7 additions & 7 deletions plugins/composer-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@
}
}
},
"wpengine/wp-graphql-webhooks": {
"wpengine/wpgraphql-webhooks": {
"0.0.4": {
"name": "wpengine/wp-graphql-webhooks",
"name": "wpengine/wpgraphql-webhooks",
"version": "0.0.4",
"type": "wordpress-plugin",
"description": "Headless webhooks for WPGraphQL",
Expand All @@ -180,15 +180,15 @@
"email": "[email protected]"
},
"dist": {
"url": "https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.4/wp-graphql-webhooks.zip",
"url": "https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.4/wpgraphql-webhooks.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0 || ~2.0"
}
},
"0.0.3": {
"name": "wpengine/wp-graphql-webhooks",
"name": "wpengine/wpgraphql-webhooks",
"version": "0.0.3",
"type": "wordpress-plugin",
"description": "Headless webhooks for WPGraphQL",
Expand All @@ -206,15 +206,15 @@
"email": "[email protected]"
},
"dist": {
"url": "https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.3/wp-graphql-webhooks.zip",
"url": "https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.3/wpgraphql-webhooks.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0 || ~2.0"
}
},
"0.0.2": {
"name": "wpengine/wp-graphql-webhooks",
"name": "wpengine/wpgraphql-webhooks",
"version": "0.0.2",
"type": "wordpress-plugin",
"description": "Headless webhooks for WPGraphQL",
Expand All @@ -232,7 +232,7 @@
"email": "[email protected]"
},
"dist": {
"url": "https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.2/wp-graphql-webhooks.zip",
"url": "https://github.com/wpengine/hwptoolkit/releases/download/%40wpengine%2Fwpgraphql-webhooks-wordpress-plugin-0.0.2/wpgraphql-webhooks.zip",
"type": "zip"
},
"require": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ setup_plugin() {
fi

# Add this repo as a plugin to the repo
if [ ! -d $WORDPRESS_ROOT_DIR/wp-content/plugins/wp-graphql-webhooks ]; then
if [ ! -d $WORDPRESS_ROOT_DIR/wp-content/plugins/wpgraphql-webhooks ]; then
echo -e "$(status_message "Symlinking the plugin to the WordPress plugins directory...")"

cd "$ORIGINAL_PATH"
Expand Down
2 changes: 1 addition & 1 deletion plugins/wpgraphql-webhooks/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"php:psalm:fix": "psalm --alter"
},
"archive": {
"name": "wp-graphql-webhooks",
"name": "wpgraphql-webhooks",
"exclude": [
"/.*",
"/assets",
Expand Down
30 changes: 15 additions & 15 deletions plugins/wpgraphql-webhooks/src/Admin/WebhooksListTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function __construct( WebhookRepository $repository ) {
$this->repository = $repository;

parent::__construct( [
'singular' => __( 'Webhook', 'wp-graphql-webhooks' ),
'plural' => __( 'Webhooks', 'wp-graphql-webhooks' ),
'singular' => __( 'Webhook', 'graphql-webhooks' ),
'plural' => __( 'Webhooks', 'graphql-webhooks' ),
'ajax' => false,
] );
}
Expand All @@ -49,11 +49,11 @@ public function __construct( WebhookRepository $repository ) {
public function get_columns() {
return [
'cb' => '<input type="checkbox" />',
'name' => __( 'Name', 'wp-graphql-webhooks' ),
'event' => __( 'Event', 'wp-graphql-webhooks' ),
'method' => __( 'Method', 'wp-graphql-webhooks' ),
'url' => __( 'URL', 'wp-graphql-webhooks' ),
'headers' => __( 'Headers', 'wp-graphql-webhooks' ),
'name' => __( 'Name', 'graphql-webhooks' ),
'event' => __( 'Event', 'graphql-webhooks' ),
'method' => __( 'Method', 'graphql-webhooks' ),
'url' => __( 'URL', 'graphql-webhooks' ),
'headers' => __( 'Headers', 'graphql-webhooks' ),
];
}

Expand All @@ -77,7 +77,7 @@ public function get_sortable_columns() {
*/
public function get_bulk_actions() {
return [
'delete' => __( 'Delete', 'wp-graphql-webhooks' ),
'delete' => __( 'Delete', 'graphql-webhooks' ),
];
}

Expand All @@ -93,12 +93,12 @@ public function process_bulk_action() {

// Verify nonce
if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( wp_unslash( $_REQUEST['_wpnonce'] ), 'bulk-' . $this->_args['plural'] ) ) {
wp_die( esc_html__( 'Security check failed.', 'wp-graphql-webhooks' ) );
wp_die( esc_html__( 'Security check failed.', 'graphql-webhooks' ) );
}

// Check permissions
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'wp-graphql-webhooks' ) );
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'graphql-webhooks' ) );
}

// Get selected webhooks
Expand Down Expand Up @@ -194,7 +194,7 @@ public function column_default( $item, $column_name ) {
return '<span class="webhook-method">' . esc_html( $item->method ) . '</span>';
case 'headers':
$count = is_array( $item->headers ) ? count( $item->headers ) : 0;
return $count > 0 ? sprintf( __( '%d headers', 'wp-graphql-webhooks' ), $count ) : '—';
return $count > 0 ? sprintf( __( '%d headers', 'graphql-webhooks' ), $count ) : '—';
default:
return '';
}
Expand Down Expand Up @@ -236,9 +236,9 @@ public function column_name( $item ) {
);

$actions = [
'edit' => sprintf( '<a href="%s">%s</a>', esc_url( $edit_url ), __( 'Edit', 'wp-graphql-webhooks' ) ),
'test' => sprintf( '<a href="#" class="test-webhook" data-webhook-id="%d">%s</a>', $item->id, __( 'Test', 'wp-graphql-webhooks' ) ),
'delete' => sprintf( '<a href="%s" class="submitdelete">%s</a>', esc_url( $delete_url ), __( 'Delete', 'wp-graphql-webhooks' ) ),
'edit' => sprintf( '<a href="%s">%s</a>', esc_url( $edit_url ), __( 'Edit', 'graphql-webhooks' ) ),
'test' => sprintf( '<a href="#" class="test-webhook" data-webhook-id="%d">%s</a>', $item->id, __( 'Test', 'graphql-webhooks' ) ),
'delete' => sprintf( '<a href="%s" class="submitdelete">%s</a>', esc_url( $delete_url ), __( 'Delete', 'graphql-webhooks' ) ),
];

return sprintf(
Expand All @@ -253,7 +253,7 @@ public function column_name( $item ) {
* Display when no items
*/
public function no_items() {
esc_html_e( 'No webhooks found.', 'wp-graphql-webhooks' );
esc_html_e( 'No webhooks found.', 'graphql-webhooks' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion plugins/wpgraphql-webhooks/wpgraphql-webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author URI: https://github.com/wpengine
* Update URI: https://github.com/wpengine/hwptoolkit
* Version: 0.0.4
* Text Domain: wpgraphql-webhooks
* Text Domain: graphql-webhooks
* Domain Path: /languages
* Requires at least: 6.0
* Tested up to: 6.8
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.