Sets up all action and filter hooks for the service.
Description
This method must be implemented and then be called from the constructor.
See also
Source
File: src/db-objects/submissions/submission-manager.php
protected function setup_hooks() { parent::setup_hooks(); $this->actions[] = array( 'name' => 'init', 'callback' => array( $this, 'schedule_cron_task' ), 'priority' => 10, 'num_args' => 0, ); $this->actions[] = array( 'name' => "{$this->get_prefix()}cron_maybe_delete_submissions", 'callback' => array( $this, 'maybe_delete_submissions' ), 'priority' => 10, 'num_args' => 0, ); $this->actions[] = array( 'name' => "{$this->get_prefix()}create_new_submission", 'callback' => array( $this, 'set_initial_submission_data' ), 'priority' => 1, 'num_args' => 2, ); $this->actions[] = array( 'name' => "admin_action_{$this->export_handler->get_export_action_name()}", 'callback' => array( $this->export_handler, 'handle_export_action' ), 'priority' => 1, 'num_args' => 0, ); $this->actions[] = array( 'name' => "{$this->get_prefix()}after_submissions_list", 'callback' => array( $this->export_handler, 'render_export_form' ), 'priority' => 10, 'num_args' => 0, ); }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |