wp-content/plugins/wordpress-seo/frontend/class-opengraph-image.php
/**
	 * Adds an image based on a given URL, and attempts to be smart about it.
	 *
	 * @param string $url The given URL.
	 *
	 * @return void
	 */
Adds an image based on a given URL, and attempts to be smart about it.
@param string $url The given URL.

@return void
Adds an image based on a given URL and attempts to be smart about it . @param string $url The given URL . @return void
protected function add_image_by_url( $url ) {
		if ( empty( $url ) ) {
			return;
		}
		$attachment_id = WPSEO_Image_Utils::get_attachment_by_url( $url );
		if ( $attachment_id > 0 ) {
			$this->add_image_by_id( $attachment_id );
			return;
		}
		$this->add_image( array( 'url' => $url ) );
	}
protected function add_image_by_url ( $ url ) { if ( empty ( $ url ) ) { return ; } $ attachment_id = WPSEO_Image_Utils :: get_attachment_by_url ( $ url ) ; if ( $ attachment_id > 0 ) { $ this -> add_image_by_id ( $ attachment_id ) ; return ; } $ this -> add_image ( array ( 'url' => $ url ) ) ; }
Adds an image based on a given URL, and attempts to be smart about it.
Adds an image based on a given URL and attempts to be smart about it .