Changeset 9089
- Timestamp:
- 10/06/2008 07:20:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r8979 r9089 2526 2526 $postdata['post_status'] = 'publish'; 2527 2527 } 2528 2529 $enclosure = array(); 2530 foreach ( (array) get_post_custom($post_ID) as $key => $val) { 2531 if ($key == 'enclosure') { 2532 foreach ( (array) $val as $enc ) { 2533 $encdata = split("\n", $enc); 2534 $enclosure['url'] = trim(htmlspecialchars($encdata[0])); 2535 $enclosure['length'] = trim($encdata[1]); 2536 $enclosure['type'] = trim($encdata[2]); 2537 break 2; 2538 } 2539 } 2540 } 2528 2541 2529 2542 $resp = array( … … 2551 2564 'custom_fields' => $this->get_custom_fields($post_ID) 2552 2565 ); 2553 2566 2567 if (!empty($enclosure)) $resp['enclosure'] = $enclosure; 2568 2554 2569 return $resp; 2555 2570 } else {
Note: See TracChangeset
for help on using the changeset viewer.