Changeset 16046
- Timestamp:
- 10/28/2010 12:12:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class.wp-xmlrpc-server.php
r16016 r16046 1485 1485 1486 1486 /** 1487 * Retrieve media item.1487 * Retrieve a media item by ID 1488 1488 * 1489 1489 * @since 3.1.0 1490 * @todo Docment this! 1491 * 1492 * @param array $args Method parameters. 1493 * @return array 1490 * 1491 * @param array $args Method parameters. Contains: 1492 * - blog_id 1493 * - username 1494 * - password 1495 * - attachment_id 1496 * @return array. Assocciative array containing: 1497 * - 'date_created_gmt' 1498 * - 'parent' 1499 * - 'link' 1500 * - 'thumbnail' 1501 * - 'title' 1502 * - 'caption' 1503 * - 'description' 1504 * - 'metadata' 1494 1505 */ 1495 1506 function wp_getMediaItem($args) { … … 1534 1545 1535 1546 /** 1536 * Retrieve media library items. 1537 * 1547 * Retrieves a collection of media library items (or attachments) 1548 * 1549 * Besides the common blog_id, username, and password arguments, it takes a filter 1550 * array as last argument. 1551 * 1552 * Accepted 'filter' keys are 'parent_id', 'mime_type', 'offset', and 'number'. 1553 * 1554 * The defaults are as follows: 1555 * - 'number' - Default is 5. Total number of media items to retrieve. 1556 * - 'offset' - Default is 0. See {@link WP_Query::query()} for more. 1557 * - 'parent_id' - Default is ''. The post where the media item is attached. Empty string shows all media items. 0 shows unattached media items. 1558 * - 'mime_type' - Default is ''. Filter by mime type (e.g., 'image/jpeg', 'application/pdf') 1559 * 1538 1560 * @since 3.1.0 1539 * @todo Document this. 1540 * 1541 * @param array $args Method parameters. 1542 * @return array 1561 * 1562 * @param array $args Method parameters. Contains: 1563 * - blog_id 1564 * - username 1565 * - password 1566 * - filter 1567 * @return array. Contains a collection of media items. See {@link wp_xmlrpc_server::wp_getMediaItem()} for a description of each item contents 1543 1568 */ 1544 1569 function wp_getMediaLibrary($args) { … … 1559 1584 do_action('xmlrpc_call', 'wp.getMediaLibrary'); 1560 1585 1561 $parent_id = ( isset($struct['parent_id']) ) ? absint($struct['parent_id']) : 0;1562 $mime_type = ( isset($struct['mime_type']) ) ? absint($struct['mime_type']) : '' ;1586 $parent_id = ( isset($struct['parent_id']) ) ? absint($struct['parent_id']) : '' ; 1587 $mime_type = ( isset($struct['mime_type']) ) ? $struct['mime_type'] : '' ; 1563 1588 $offset = ( isset($struct['offset']) ) ? absint($struct['offset']) : 0 ; 1564 1589 $number = ( isset($struct['number']) ) ? absint($struct['number']) : -1 ;
Note: See TracChangeset
for help on using the changeset viewer.