Automator_Recipe_Process_Complete::is_any_trigger_option_set( $recipe_id )

Check if “Any” option is selected for triggers


Parameters Parameters

$recipe_id

(Required)


Top ↑

Return Return

(bool)


Source Source

File: src/core/lib/process/class-automator-recipe-process-complete.php

	public function is_any_trigger_option_set( $recipe_id ) {
		$value = get_post_meta( $recipe_id, 'run_when_any_trigger_complete', true );
		if ( empty( $value ) ) {
			return apply_filters( 'automator_recipe_any_trigger_complete', false, $recipe_id );
		}
		if ( 'any' !== $value ) {
			return apply_filters( 'automator_recipe_any_trigger_complete', false, $recipe_id );
		}

		return apply_filters( 'automator_recipe_any_trigger_complete', true, $recipe_id );
	}