WPJM_JOBAPPLICATION::define_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/wp-job-manager/triggers/wpjm-jobapplication.php
public function define_trigger() { $trigger = array( 'author' => Automator()->get_author_name( $this->trigger_code ), 'support_link' => Automator()->get_author_support_link( $this->trigger_code, 'integration/wp-job-manager/' ), 'integration' => self::$integration, 'code' => $this->trigger_code, /* translators: Logged-in trigger - WP Job Manager */ 'sentence' => sprintf( esc_attr__( 'A user applies for {{a job:%1$s}}', 'uncanny-automator' ), $this->trigger_meta ), /* translators: Logged-in trigger - WP Job Manager */ 'select_option_name' => esc_attr__( 'A user applies for {{a job}}', 'uncanny-automator' ), 'action' => 'new_job_application', 'priority' => 20, 'accepted_args' => 2, 'validation_function' => array( $this, 'new_job_application' ), 'options' => [ Automator()->helpers->recipe->wp_job_manager->options->list_wpjm_jobs( null, $this->trigger_meta ), ], ); Automator()->register->trigger( $trigger ); }
Expand full source code Collapse full source code View on Github