ACF_Ajax::add_actions
add_actions
Adds the ajax actions for this response.
Method of the class: ACF_Ajax{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Ajax = new ACF_Ajax(); $ACF_Ajax->add_actions();
Changelog
| Since 5.7.2 | Introduced. |
ACF_Ajax::add_actions() ACF Ajax::add actions code ACF 6.0.4
function add_actions() {
// add action for logged-in users
add_action( "wp_ajax_{$this->action}", array( $this, 'request' ) );
// add action for non logged-in users
if ( $this->public ) {
add_action( "wp_ajax_nopriv_{$this->action}", array( $this, 'request' ) );
}
}