WordPress at a glance
функция не описана

wp_xmlrpc_server::_prepare_media_item() protected WP 1.0

Prepares media item data for return in an XML-RPC object.

It's a method of the class: wp_xmlrpc_server{}

Hooks from the method
Возвращает

Array. The prepared media item data.

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

// protected - for code of main (parent) or child class
$result = $this->_prepare_media_item( $media_item, $thumbnail_size );
$media_item(object) (required)
The unprepared media item data.
$thumbnail_size(string)
The image size to use for the thumbnail URL.
Default: 'thumbnail'

Код wp_xmlrpc_server::_prepare_media_item() WP 5.5.1

<?php
protected function _prepare_media_item( $media_item, $thumbnail_size = 'thumbnail' ) {
	$_media_item = array(
		'attachment_id'    => strval( $media_item->ID ),
		'date_created_gmt' => $this->_convert_date_gmt( $media_item->post_date_gmt, $media_item->post_date ),
		'parent'           => $media_item->post_parent,
		'link'             => wp_get_attachment_url( $media_item->ID ),
		'title'            => $media_item->post_title,
		'caption'          => $media_item->post_excerpt,
		'description'      => $media_item->post_content,
		'metadata'         => wp_get_attachment_metadata( $media_item->ID ),
		'type'             => $media_item->post_mime_type,
	);

	$thumbnail_src = image_downsize( $media_item->ID, $thumbnail_size );
	if ( $thumbnail_src ) {
		$_media_item['thumbnail'] = $thumbnail_src[0];
	} else {
		$_media_item['thumbnail'] = $_media_item['link'];
	}

	/**
	 * Filters XML-RPC-prepared data for the given media item.
	 *
	 * @since 3.4.0
	 *
	 * @param array  $_media_item    An array of media item data.
	 * @param object $media_item     Media item object.
	 * @param string $thumbnail_size Image size.
	 */
	return apply_filters( 'xmlrpc_prepare_media_item', $_media_item, $media_item, $thumbnail_size );
}