xmlrpc_prepare_media_item filter-hookWP 3.4.0

Filters XML-RPC-prepared data for the given media item.

Usage

add_filter( 'xmlrpc_prepare_media_item', 'wp_kama_xmlrpc_prepare_media_item_filter', 10, 3 );

/**
 * Function for `xmlrpc_prepare_media_item` filter-hook.
 * 
 * @param array   $_media_item    An array of media item data.
 * @param WP_Post $media_item     Media item object.
 * @param string  $thumbnail_size Image size.
 *
 * @return array
 */
function wp_kama_xmlrpc_prepare_media_item_filter( $_media_item, $media_item, $thumbnail_size ){

	// filter...
	return $_media_item;
}
$_media_item(array)
An array of media item data.
$media_item(WP_Post)
Media item object.
$thumbnail_size(string)
Image size.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

wp_xmlrpc_server::_prepare_media_item()
xmlrpc_prepare_media_item
wp-includes/class-wp-xmlrpc-server.php 1089
return apply_filters( 'xmlrpc_prepare_media_item', $_media_item, $media_item, $thumbnail_size );

Where the hook is used in WordPress

Usage not found.