PRESTO_VIDEOCOMPLETE::define_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/presto/triggers/presto-videocomplete.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/presto-player/' ), 'integration' => self::$integration, 'code' => $this->trigger_code, /* translators: Logged-in trigger - Presto Player */ 'sentence' => sprintf( esc_attr__( 'A user completes {{a video:%1$s}}', 'uncanny-automator' ), $this->trigger_meta ), /* translators: Logged-in trigger - Presto Player */ 'select_option_name' => esc_attr__( 'A user completes {{a video}}', 'uncanny-automator' ), 'action' => 'presto_player_progress', 'priority' => 20, 'accepted_args' => 2, 'validation_function' => array( $this, 'video_progress' ), 'options' => array( Automator()->helpers->recipe->presto->options->list_presto_videos( null, $this->trigger_meta ), ), ); Automator()->register->trigger( $trigger ); }
Expand full source code Collapse full source code View on Github