This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Image_Import::check_duplicate( $image_uri )

Check if a duplicate image exists


Parameters

$image_uri

(Required)


Return

(false|int|\WP_Post)


Source

File: includes/libs/image-import.class.php

	private function check_duplicate( $image_uri ){

		$args = [
			'post_type' => 'attachment',
			'numberposts' => 1,
			'suppress_filters' => true,
			'meta_query' => [[
				'key' => '__vimeo_image_uri',
				'value' => $image_uri,
				'compare' => 'LIKE'
			]]
		];

		$posts = get_posts( $args );

		return isset( $posts[0] ) ? $posts[0] : false;
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!