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

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/jascha030/wp-ajax

1.1.0 2020-04-26 23:47 UTC

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.