Handle enclosures in xmlrpc. Props josephscott. fixes #3405
git-svn-id: http://svn.automattic.com/wordpress/trunk@7847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a2220d1659
commit
ded2d7929d
12
xmlrpc.php
12
xmlrpc.php
|
@ -1337,6 +1337,12 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
|
||||
}
|
||||
|
||||
// Handle enclosures
|
||||
$enclosure = $content_struct['enclosure'];
|
||||
if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
|
||||
add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
|
||||
}
|
||||
|
||||
$this->attach_uploads( $post_ID, $post_content );
|
||||
|
||||
logIO('O', "Posted ! ID: $post_ID");
|
||||
|
@ -1593,6 +1599,12 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
|
||||
}
|
||||
|
||||
// Handle enclosures
|
||||
$enclosure = $content_struct['enclosure'];
|
||||
if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
|
||||
add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
|
||||
}
|
||||
|
||||
$this->attach_uploads( $ID, $post_content );
|
||||
|
||||
logIO('O',"(MW) Edited ! ID: $post_ID");
|
||||
|
|
Loading…
Reference in New Issue