{"id":13516382,"url":"https://github.com/crgeary/wp-jamstack-deployments","last_synced_at":"2025-03-31T06:30:59.474Z","repository":{"id":46276319,"uuid":"134476855","full_name":"crgeary/wp-jamstack-deployments","owner":"crgeary","description":"A WordPress plugin for JAMstack deployments","archived":true,"fork":false,"pushed_at":"2021-11-02T22:22:52.000Z","size":139,"stargazers_count":253,"open_issues_count":8,"forks_count":41,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-01T21:33:19.290Z","etag":null,"topics":["jamstack","netlify","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/wp-jamstack-deployments/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crgeary.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-22T21:16:26.000Z","updated_at":"2024-05-23T04:07:37.000Z","dependencies_parsed_at":"2022-08-31T07:10:41.448Z","dependency_job_id":null,"html_url":"https://github.com/crgeary/wp-jamstack-deployments","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgeary%2Fwp-jamstack-deployments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgeary%2Fwp-jamstack-deployments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgeary%2Fwp-jamstack-deployments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crgeary%2Fwp-jamstack-deployments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crgeary","download_url":"https://codeload.github.com/crgeary/wp-jamstack-deployments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246429459,"owners_count":20775805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jamstack","netlify","wordpress","wordpress-plugin"],"created_at":"2024-08-01T05:01:21.850Z","updated_at":"2025-03-31T06:30:54.454Z","avatar_url":"https://github.com/crgeary.png","language":"PHP","funding_links":[],"categories":["Plugins"],"sub_categories":["WordPress"],"readme":"# JAMstack Deployments\n\nA WordPress plugin for JAMstack deployments on Netlify (and other platforms).\n\n## Description\n\nThis plugin provides a way to fire off a request to a webhook when a post, page or custom post type has been created, udpated or deleted. You're also able to fire off a request manually at the click of a button, or programmatically via a WordPress action.\n\n## Screenshots\n\n![Settings Screen](.wordpress-org/screenshot-1.png)\n\n## Installing the Plugin\n\nClone the contents of this repository to your WordPress plugins folder and activate the plugin via the installed plugins page.\n\n## Configuration\n\nThe plugin attempts to trigger builds when you update your content, and has settings that you can use to define what post types \u0026 taxonomies should be monitored.\n\nYou can access the plugin's settings in WordPress by accessing the 'Settings' panel on the left hand side of the dashboard and then clicking 'Deployments'.\n\nFrom this screen you can configure the following:\n\n- **Webhook URL** - The webhook URL that you have created to trigger a deployment. For more information on webhooks with Netlify [visit the Netlify documentation](https://www.netlify.com/docs/webhooks/).\n- **Webhook Method** - This is the required method for the webhook request. The available options are `GET` or `POST`. By default the plugin will automatically select `POST`.\n- **Badge Image URL** - An optional field to specify the `src` of a badge, for services that support badges.\n- **Badge Link** - An optional field to specify the `href` of a badge, for services that support badges.\n- **Post Types** - A list of selectable post types that will trigger a Netlify deployment when created, updated or deleted. Note that only selected post types will trigger a deployment.\n- **Taxonomies** - A list of selectable taxonomies that will trigger a Netlify deployment when created, updated or deleted. Note that only selected taxonomies will trigger a deployment.\n\n**If you need more control, there are actions \u0026 filters you can use to get the job done.**\n\n### Post Types\n\nYou can choose which posts types should trigger builds from the plugin settings. However, you may require more control, or need to overwrite the settings, you can do so using the `jamstack_deployments_post_types` filter. By default, this filter contains an array of post types that we monitor. You can add or remove them as required.\n\nFor example, if you want to force the plugin to trigger builds for the `'post'` post type regardless of the settings, you can do so with the following code:\n\n```php\nadd_filter('jamstack_deployments_post_types', function ($post_types, $post_id, $post) {\n    if (!in_array($post-\u003epost_type, $post_types, true)) {\n        $post_types[] = 'post';\n    }\n    return $post_types;\n}, 10, 3);\n```\n\n### Taxonomies\n\nLike post types, you can choose which taxonmies should trigger builds from the plugin settings. But there may be times you need more control. For this, you can use the `jamstack_deployments_taxonomies` filter. By default, this filter contains an array of taxonomies that we monitor.\n\nFor example, if you want to force the plugin to trigger builds for the `'post_tag'` taxonomy regardless of the settings, you can do so with the following code:\n\n```php\nadd_filter('jamstack_deployments_taxonomies', function ($taxonomies, $term_id, $tax_id) {\n    $tax = get_taxonomy($tax_id);\n    if (!in_array($tax-\u003ename, $taxonomies, true)) {\n        $taxonomies[] = 'post_tag';\n    }\n    return $taxonomies;\n}, 10, 3);\n```\n\n### Post Statuses\n\nYou can use the `jamstack_deployments_post_statuses` filter to change which post statuses we monitor. The default is to monitor `'publish'`, `'private'` and `'trash'`.\n\nHere is an example that adds `'review'` to the array of post statuses that we monitor \u0026 will trigger builds for.\n\n```php\nadd_filter('jamstack_deployments_post_statuses', function ($statuses, $post_id, $post) {\n    $statuses[] = 'review';\n    return $statuses;\n}, 10, 3);\n```\n\n## Custom Actions\n\nThe `jamstack_deployments_fire_webhook` action can be used to fire the webhook and trigger a build at a custom point that you specify. For example, if you want to fire the webhook when a user registers, then you can use:\n\n```php\nadd_action('user_register', 'jamstack_deployments_fire_webhook');\n```\n\n## Running Code Before \u0026 After Webhooks\n\nYou can run code directly before or after you fire the webhook using the following actions:\n\n* Before: `jamstack_deployments_before_fire_webhook`\n* After: `jamstack_deployments_after_fire_webhook`\n\n## Changing Webhook Request Arguments\n\nYou can modify the arguments sent to the `wp_remote_safe_*` functions using the `jamstack_deployments_webhook_request_args` filter.\n\n## License\n[GPL-3.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrgeary%2Fwp-jamstack-deployments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrgeary%2Fwp-jamstack-deployments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrgeary%2Fwp-jamstack-deployments/lists"}