WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

WPSEO_Image_Utils::get_data() public Yoast 1.0

Retrieves the image data.

{} Это метод класса: WPSEO_Image_Utils{}

Хуки из метода
Возвращает

false/Массив. $image {

Array of image data
@type string $alt      Image's alt text.
@type string $path     Path of image.
@type int    $width    Width of image.
@type int    $height   Height of image.
@type string $type     Image's MIME type.
@type string $size     Image's size.
@type string $url      Image's URL.
@type int    $filesize The file size in bytes, if already set.

}

Использование

$result = WPSEO_Image_Utils::get_data( $image, $attachment_id );
$image(массив) (обязательный)
Image array with URL and metadata.
$attachment_id(число) (обязательный)
Attachment ID.

Код WPSEO_Image_Utils::get_data() Yoast 16.2

<?php
public static function get_data( $image, $attachment_id ) {
	if ( ! is_array( $image ) ) {
		return false;
	}

	// Deals with non-set keys and values being null or false.
	if ( empty( $image['width'] ) || empty( $image['height'] ) ) {
		return false;
	}

	$image['id']     = $attachment_id;
	$image['alt']    = self::get_alt_tag( $attachment_id );
	$image['pixels'] = ( (int) $image['width'] * (int) $image['height'] );

	if ( ! isset( $image['type'] ) ) {
		$image['type'] = get_post_mime_type( $attachment_id );
	}

	/**
	 * Filter: 'wpseo_image_data' - Filter image data.
	 *
	 * Elements with keys not listed in the section will be discarded.
	 *
	 * @api array {
	 *     Array of image data
	 *
	 *     @type int    id       Image's ID as an attachment.
	 *     @type string alt      Image's alt text.
	 *     @type string path     Image's path.
	 *     @type int    width    Width of image.
	 *     @type int    height   Height of image.
	 *     @type int    pixels   Number of pixels in the image.
	 *     @type string type     Image's MIME type.
	 *     @type string size     Image's size.
	 *     @type string url      Image's URL.
	 *     @type int    filesize The file size in bytes, if already set.
	 * }
	 * @api int  Attachment ID.
	 */
	$image = apply_filters( 'wpseo_image_data', $image, $attachment_id );

	// Keep only the keys we need, and nothing else.
	return array_intersect_key( $image, array_flip( [ 'id', 'alt', 'path', 'width', 'height', 'pixels', 'type', 'size', 'url', 'filesize' ] ) );
}