jascha030 / wp-ajax
This package is abandoned and no longer maintained.
No replacement package was suggested.
WP Ajax with OOP, also includes provider class for usage with jascha030/wp-subscriptions
1.1.0
2020-04-26 23:47 UTC
Requires
- jascha030/wp-oop-utilities: 1.0.0
- jascha030/wp-subscriptions: 1.0.3
This package is auto-updated.
Last update: 2022-03-27 04:29:52 UTC
README
WP Ajax with OOP
the WpAjax
class can be extended, every method that is public and not magic will automatically be added to its own wp_admin hook.
So for example:
// Method helloWorld will be added to hook: "wp_ajax_helloWorld" and optionally "wp_ajax_nopriv_helloWorld" public function helloWord() { return wp_send_json("hello world"); }
Nopriv is added by default but can be set false.