Make WordPress Core

Changeset 7847 for trunk/xmlrpc.php


Ignore:
Timestamp:
04/28/2008 04:15:23 PM (17 years ago)
Author:
ryan
Message:

Handle enclosures in xmlrpc. Props josephscott. fixes #3405

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r7645 r7847  
    13381338        }
    13391339
     1340        // Handle enclosures
     1341        $enclosure = $content_struct['enclosure'];
     1342        if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
     1343            add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
     1344        }
     1345
    13401346        $this->attach_uploads( $post_ID, $post_content );
    13411347
     
    15931599            $this->set_custom_fields($post_ID, $content_struct['custom_fields']);
    15941600        }
     1601
     1602        // Handle enclosures
     1603        $enclosure = $content_struct['enclosure'];
     1604        if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
     1605            add_post_meta( $post_ID, 'enclosure', $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] );
     1606        }
    15951607
    15961608        $this->attach_uploads( $ID, $post_content );
Note: See TracChangeset for help on using the changeset viewer.