helpers->schema->image' ); $this->schema_id = $schema_id; } /** * Find an image based on its URL and generate a Schema object for it. * * @codeCoverageIgnore * @deprecated 14.0 * * @param string $url The image URL to base our object on. * @param string $caption An optional caption. * * @return array Schema ImageObject array. */ public function generate_from_url( $url, $caption = '' ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_url' ); return YoastSEO()->helpers->schema->image->generate_from_url( $this->schema_id, $url, $caption ); } /** * Retrieve data about an image from the database and use it to generate a Schema object. * * @codeCoverageIgnore * @deprecated 14.0 * * @param int $attachment_id The attachment to retrieve data from. * @param string $caption The caption string, if there is one. * * @return array Schema ImageObject array. */ public function generate_from_attachment_id( $attachment_id, $caption = '' ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->generate_from_attachment_id' ); return YoastSEO()->helpers->schema->image->generate_from_attachment_id( $this->schema_id, $attachment_id, $caption ); } /** * If we can't find $url in our database, we output a simple ImageObject. * * @codeCoverageIgnore * @deprecated 14.0 * * @param string $url The image URL. * @param string $caption A caption, if set. * * @return array Schema ImageObject array. */ public function simple_image_object( $url, $caption = '' ) { _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->image->simple_image_object' ); return YoastSEO()->helpers->schema->image->simple_image_object( $this->schema_id, $url, $caption ); } }