jascha030 / wp-ajax
WP Ajax with OOP, also includes provider class for usage with jascha030/wp-subscriptions
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jascha030/wp-ajax
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.