LD_MARKCOURSEDONE::define_action()
Define and register the action by pushing it into the Automator object
Source Source
File: src/integrations/learndash/actions/ld-markcoursedone.php
public function define_action() { $action = array( 'author' => Automator()->get_author_name(), 'support_link' => Automator()->get_author_support_link( $this->action_code, 'integration/learndash/' ), 'integration' => self::$integration, 'code' => $this->action_code, /* translators: Action - LearnDash */ 'sentence' => sprintf( esc_attr__( 'Mark {{a course:%1$s}} complete for the user', 'uncanny-automator' ), $this->action_meta ), /* translators: Action - LearnDash */ 'select_option_name' => esc_attr__( 'Mark {{a course}} complete for the user', 'uncanny-automator' ), 'priority' => 10, 'accepted_args' => 1, 'execution_function' => array( $this, 'mark_completes_a_course' ), 'options' => [ Automator()->helpers->recipe->learndash->options->all_ld_courses( null, 'LDCOURSE', false ), ], ); Automator()->register->action( $action ); }
Expand full source code Collapse full source code View on Github