From bd6038ce1a100202bc5e236ec6618475cbacef9f Mon Sep 17 00:00:00 2001 From: josephscott Date: Wed, 8 Feb 2012 23:32:25 +0000 Subject: [PATCH] Provide the attachment_id of a media item in the XML-RPC call wp.getMediaItem. Props skithund Fixes #18683 git-svn-id: http://svn.automattic.com/wordpress/trunk@19885 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 613988ac32..e26705edcb 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -2260,6 +2260,7 @@ class wp_xmlrpc_server extends IXR_Server { 'caption' => $attachment->post_excerpt, 'description' => $attachment->post_content, 'metadata' => wp_get_attachment_metadata($attachment->ID), + 'attachment_id' => (string) $attachment->ID ); return $attachment_struct;