private function _register_actions() { foreach (get_class_methods($this) as $method) { if (String::position($method, 'action_') === 0) { $action = String::sub_string($method, 7); add_action('wp_ajax_' . $this->get_prefix() . '_' . $action, [$this, $method]); add_action('wp_ajax_nopriv_' . $this->get_prefix() . '_' . $action, [$this, $method]); } } }