Automator_Helpers_Recipe::maybe_load_trigger_options( string $class = '' )


Parameters Parameters

$class

(string) (Optional)

Default value: ''


Top ↑

Return Return

(bool)


Source Source

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

	public function maybe_load_trigger_options( $class = '' ) {
		if ( is_admin() && automator_filter_has_var( 'action' ) && 'edit' === automator_filter_input( 'action' ) && automator_filter_has_var( 'post' ) ) {
			$post_id = absint( automator_filter_input( 'post' ) );
			$post    = get_post( $post_id );
			if ( $post && $post instanceof \WP_Post && 'uo-recipe' === $post->post_type ) {
				return apply_filters( 'automator_do_load_options', true, $class );
			}
		}

		return apply_filters( 'automator_do_load_options', true, $class );
	}