Recipe_Post_Utilities::redirect_to_recipe( $value,  $post )


Parameters Parameters

$value

(Required)

$post

(Required)


Top ↑

Return Return

(mixed)


Source Source

File: src/core/automator-post-types/uo-recipe/class-recipe-post-utilities.php

	public function redirect_to_recipe( $value, $post ) {

		global $current_screen;

		if ( $current_screen && 'add' === $current_screen->action && 'uo-recipe' === $current_screen->post_type ) {
			wp_safe_redirect( admin_url( 'post.php?post=' . $post->ID . '&action=edit' ) );
			die();
		}

		return $value;
	}