LH Webhooks Api
开发者 |
shawfactor
|
更新时间 |
2018年3月22日 12:29 |
捐献地址: |
去捐款 |
PHP版本: |
3.0. 及以上 |
WordPress版本: |
4.9 |
版权: |
GPLv2 or later |
版权网址: |
版权信息
|
详情介绍:
This plugin allows you to create and delete token authenticated webhook enpoints for WordPress users (as many as you need).
It also comes with a programming api to define methods which is the action is taken on the data posted to said endpoints.
安装:
- Upload the entire
lh-webhooks-api
folder to the /wp-content/plugins/
directory.
- Activate the plugin through the 'Plugins' menu in WordPress.
- Navigate to Settings->Webhooks and create endpoints
常见问题:
How do I programatically define a new method for handling data posted to the webhooks?
- Each webhook msut have a method, this is passed to the endpoint as a GET string i.e. ?method=my_post_handler.
What happens to the posted data is defined by you programically by you. An example method 'log_via_email' is defined in the code (with explanatory comments).
The first step is to define the allowed methods, via the lh_webhooks_api_allowed_methods filter.
The second step is to define what happens to the posted data. this is done via a variable filter, i.e. lh_webhooks_api_* , where the * portion of the filter name is the name of your method. in the example this is 'lh_webhooks_api_log_via_email'.
更新日志:
1.00 March 20, 2018\
Initial release.