Closure_Setup::register_closure()

Define and register the closure by pushing it into the Automator object


Source Source

File: src/core/lib/recipe-parts/closures/trait-closure-setup.php

	protected function register_closure() {

		$closure = array(
			'author'             => $this->get_author(),
			'support_link'       => $this->get_support_link(),
			'is_pro'             => $this->get_is_pro(),
			'is_deprecated'      => $this->get_is_deprecated(),
			'integration'        => $this->get_integration(),
			'code'               => $this->get_code(),
			'sentence'           => $this->get_sentence(),
			'select_option_name' => $this->get_readable_sentence(),
			'execution_function' => array( $this, 'redirect' ),
			'options'            => array( $this->get_options() ),
		);

		$closure = apply_filters( 'automator_register_closure', $closure );

		Automator()->register->closure( $closure );
	}