xmlrpc_prepare_media_item WordPress Filter Hook

The xmlrpc_prepare_media_item hook allows you to modify a media item before it is sent via XML-RPC. This can be useful for setting custom fields or post content, for example.

apply_filters( 'xmlrpc_prepare_media_item', array $_media_item, WP_Post $media_item, string $thumbnail_size ) #

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


Parameters

$_media_item

(array)An array of media item data.

$media_item

(WP_Post)Media item object.

$thumbnail_size

(string)Image size.


Top ↑

Source

File: wp-includes/class-wp-xmlrpc-server.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More