Populate_From_Query::add_new_trigger()

Creates a trigger.


Return Return

(bool)


Source Source

File: src/core/classes/class-populate-from-query.php

	public static function add_new_trigger() {

		self::change_recipe_type();

		$trigger_id = self::add_trigger();

		// Trigger was created, check if its meta needs to be set
		self::maybe_update_trigger( $trigger_id );

		// add do_action for external hooks
		do_action_deprecated(
			'uap_trigger_populated_from_query',
			array(
				self::$post,
				$trigger_id,
				$_GET, // phpcs:ignore WordPress.Security.NonceVerification.Recommended
			),
			'3.0',
			'automator_trigger_populated_from_query'
		);
		do_action( 'automator_trigger_populated_from_query', self::$post, $trigger_id, $_GET ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended

		return true;

	}