UT_USERS_TIME_IN_COURSE_EXCEEDS::load_options()

load_options


Source Source

File: src/integrations/uncanny-toolkit/triggers/ut-users-time-in-course-exceeds.php

	public function load_options() {

		$all_courses = Automator()->helpers->recipe->learndash->options->get_all_ld_courses( 'Course', $this->trigger_meta );

		$minutes_args = array(
			'option_code' => $this->trigger_meta . '_COURSEMINUTES',
			'input_type'  => 'text',
			'label'       => esc_attr__( 'Minutes', 'uncanny-automator' ),
			'required'    => true,
			'token_name'  => __( 'Time in minutes', 'uncanny-automator' ),
		);

		$options = array(
			'options' => array(
				$all_courses,
				Automator()->helpers->recipe->field->text( $minutes_args ),
			),
		);

		return Automator()->utilities->keep_order_of_options( $options );
	}