WP_USERCREATESPOST::schedule_a_post( $post_id,  $post,  $update,  $post_before )


Parameters Parameters

$post_id

(Required)

$post

(Required)

$update

(Required)

$post_before

(Required)


Source Source

File: src/integrations/wp/triggers/wp-usercreatespost.php

	public function schedule_a_post( $post_id, $post, $update, $post_before ) {
		if ( ! empty( $post_before ) && 'publish' === $post_before->post_status ) {
			return;
		}
		if ( 'publish' !== $post->post_status ) {
			return;
		}
		if ( wp_next_scheduled( 'uoa_wp_after_insert_post', array( $post_id ) ) ) {
			return;
		}
		wp_schedule_single_event(
			apply_filters( 'automator_schedule_a_post_time', time() + 2, $post_id, $post, $update, $post_before ),
			'uoa_wp_after_insert_post',
			array(
				$post_id,
			)
		);
	}