UOA_RECIPECOMPLETED::define_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/uncanny-automator/triggers/uoa-recipecompleted.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/automator-core/' ), 'integration' => self::$integration, 'code' => $this->trigger_code, /* translators: Logged-in trigger - Uncanny Automator */ 'sentence' => sprintf( esc_attr__( 'A user completes {{a recipe:%1$s}} {{a number of:%2$s}} time(s)', 'uncanny-automator' ), $this->trigger_meta, 'NUMTIMES' ), /* translators: Logged-in trigger - Uncanny Automator */ 'select_option_name' => esc_attr__( 'A user completes {{a recipe}} {{a number of}} time(s)', 'uncanny-automator' ), 'action' => 'automator_recipe_completed', 'priority' => 99, 'accepted_args' => 4, 'validation_function' => array( $this, 'on_completion' ), 'options' => [ Automator()->helpers->recipe->uncanny_automator->options->get_recipes(), Automator()->helpers->recipe->options->number_of_times(), ], ); Automator()->register->trigger( $trigger ); return; }
Expand full source code Collapse full source code View on Github