Populate_From_Query::maybe_populate( $post_id, WP_Post $post,  $update )

Figure out if this post needs to be populated from the query params.


Parameters Parameters

$post_id

(Required)

$post

(Required)

$update

(Required)


Top ↑

Return Return

(bool)


Source Source

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

	public static function maybe_populate( $post_ID, $post, $update ) {
		self::init( $post );
		try {
			if ( self::is_new_recipe() ) {
				if ( self::query_args_exist( array( 'action', 'nonce' ) ) ) {
					if ( self::is_authorized() ) {
						return self::populate();
					}
				}
				return false;
			}
		} catch ( \Throwable $e ) {
			error_log( 'Uncanny_Automator\Populate_From_Query: ' . $e->getMessage() );
		}
	}