WP_USERCREATESPOST::store_thumbnail( $post, null $request = null, null $creating = null )


Parameters Parameters

$post

(Required)

$request

(Optional)

Default value: null

$creating

(Optional)

Default value: null


Source Source

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

	public function store_thumbnail( $post, $request = null, $creating = null ) {

		// Post Featured Image URL
		$this->trigger_meta['meta_key']   = $this->result['args']['trigger_id'] . ':' . $this->trigger_code . ':POSTIMAGEURL';
		$this->trigger_meta['meta_value'] = maybe_serialize( get_the_post_thumbnail_url( $this->post->ID, 'full' ) );
		Automator()->insert_trigger_meta( $this->trigger_meta );

		// Post Featured Image ID
		$this->trigger_meta['meta_key']   = $this->result['args']['trigger_id'] . ':' . $this->trigger_code . ':POSTIMAGEID';
		$this->trigger_meta['meta_value'] = maybe_serialize( get_post_thumbnail_id( $this->post->ID ) );
		Automator()->insert_trigger_meta( $this->trigger_meta );

	}