heinnge / hookpress Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mitcho/hookpress
HookPress
This project forked from mitcho/hookpress
HookPress
=== HookPress === Contributors: mitchoyoshitaka, automattic Author: mitcho (Michael Yoshitaka Erlewine) Author URI: http://mitcho.com/ Plugin URI: http://mitcho.com/code/ Donate link: http://tinyurl.com/donatetomitcho Tags: hook, filter, action, plugin, webhook, webhooks, notification, internal Requires at least: 3.6 Tested up to: 4.1 Stable tag: 1.14 HookPress turns your WordPress-internal hooks into webhooks. Possible uses include generating push notifications or extending WordPress with non-PHP. == Description == Webhooks are a simple paradigm for developing instant notifications and mashups based on simple HTTP requests. With HookPress you can set up webhooks so that a specified URL (a public service or something you set up) is requested when certain WordPress actions occur. Possible uses include generating push notifications or using non-PHP web technology to extend WordPress. [vimeo 5905102] A tutorial video is available [on WordPress.tv](http://wordpress.tv/2009/09/13/introduction-to-hookpress/). **[As seen on WordPress.com!](http://en.blog.wordpress.com/2010/04/14/hook-line-and-sinker/)** **To learn about the various hooks WordPress provides**, please consult the WordPress Plugin API's [Action Reference](http://codex.wordpress.org/Plugin_API/Action_Reference) and [Filter Reference](http://codex.wordpress.org/Plugin_API/Filter_Reference). Not all hooks are supported yet, but more are in the works. **To learn more about webhooks**, take a look at the [wikipedia page](https://en.wikipedia.org/wiki/Webhook) and also [The Pushbutton Web](http://dashes.com/anil/2009/07/the-pushbutton-web-realtime-becomes-real.html) by Anil Dash. Webhooks champion Jeff Lindsay's [excellent slides](http://www.slideshare.net/progrium/using-web-hooks) are a particularly good place to start. **To write and host a target script** The easiest option is to set up a script on your own server to catch POST requests and act on them. [Requestbin](http://requestb.in/) is a nice, free service which will host an endpoint, collect all requests, and let you inspect them, which is a great way to test requests generated by your webhooks. There is also a PHP script which does a simple version of this, `test.php`, included with HookPress. == Installation == Upload the HookPress plugin to your blog's `wp-content/plugins/` directory and activate. In the admin section, go to Settings > Webhooks to add new webhooks. == Frequently Asked Questions == If you have a feature request or question, please use the [HookPress support forum](http://wordpress.org/tags/hookpress). = How does HookPress affect performance? = HookPress currently makes requests synchronously so can measurably affect performance. I highly recommend using a caching plugin such as [WP-SuperCache](http://ocaoimh.ie/wp-super-cache/) to stem the performance hit. If your filters' results are time-sensitive or dependent on external data sources as well, make sure to set an appropriate cache expiration time. == Changelog == = 1.14 = * Additional security hardening for `test.php`, now no longer bundled as a `.php` = 1.13 = * Important security fix to the test endpoint, `test.php`. * Code cleanup, fix bugs introduced in previous version. = 1.12 = * Upgraded to work properly with jQuery 1.9+. [Props liquidgecha](https://github.com/mitcho/hookpress/commit/0b21dfec8136d51971a21fb6cbdd4ff2b8d60753). * Dropped the initial 0. in the version number, as that was just ridiculous. :) = 0.1.11 = * Fix to register the right number of incoming arguments for actions. = 0.1.10 = * No longer depends on the Snoopy library; uses `wp_remote_post()` instead. Note that the HTTP referer may no longer be sent correctly. * Added the `hookpress_request` filter. * Code cleanup = 0.1.9 = * New snazzy options screen, with [help from Automattic](http://en.blog.wordpress.com/2010/04/14/hook-line-and-sinker/) * added webhook editing * Various miscellaneous features: added nonces for security, modularized the code a bit, etc. = 0.1.8 = * Added more filters�now covers basic + comment filters * Marking as compatible through 2.9.9, because it should be. * Added version checking and beta offers to the options screen. = 0.1.7 = * Now supports basically all actions. (Still no actions with no arguments.) * Added more filter options�now covers all basic database read filters. = 0.1.6 = * Added another batch of actions. (Still no actions with no arguments, though... something to consider.) * Fixed hooks which referred to the users and links tables. = 0.1.5 = * Now enforces sending the first field in filters and highlights the first field. * Added FAQ note on performance concerns and caching. = 0.1.4 = * Bugfix: hooks with ID 0 can now be deleted * Made HookPress fully localizable - please email before you start localizing to claim your language. = 0.1.3 = * A small bugfix to the filters list for `save_pre` * Initial support for filters with an short list of supported filters * Updated `test.php` to return first parameter (to trivially support filters) = 0.1.2 = * Added support for the `post_url` field * Added support for `parent_*` post fields for `save_post` which are sent in case the post is a revision of a previous draft. * Fixes a PHP error which displayed on install * Disallowed redirects on the webhook - corrects duplicate records when used with PostBin = 0.1.1 = * Fixed namespace collision with [Yet Another Related Posts Plugin](http://mitcho.com/code/yarpp/). * Minor documentation changes. = 0.1 = * Initial release * supports webhooks based on WP actions = Future plans = * Editing webhooks (rather than deleting and adding) * More custmization on a per-webhook basis If you have a feature request or question, please use the <a href='http://wordpress.org/tags/hookpress'>HookPress support forum</a>.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.