Changeset 16438 for trunk/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 11/17/2010 06:47:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r16331 r16438 1489 1489 * @since 3.1.0 1490 1490 * 1491 * @param array $args Method parameters. Contains: 1491 * @param array $args Method parameters. Contains: 1492 1492 * - blog_id 1493 1493 * - username 1494 1494 * - password 1495 1495 * - attachment_id 1496 * @return array. Assocciative array containing: 1496 * @return array. Assocciative array containing: 1497 1497 * - 'date_created_gmt' 1498 1498 * - 'parent' … … 1546 1546 /** 1547 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 1548 * 1549 * Besides the common blog_id, username, and password arguments, it takes a filter 1550 1550 * array as last argument. 1551 * 1551 * 1552 1552 * Accepted 'filter' keys are 'parent_id', 'mime_type', 'offset', and 'number'. 1553 * 1553 * 1554 1554 * The defaults are as follows: 1555 1555 * - 'number' - Default is 5. Total number of media items to retrieve. … … 1557 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 1558 * - 'mime_type' - Default is ''. Filter by mime type (e.g., 'image/jpeg', 'application/pdf') 1559 * 1559 * 1560 1560 * @since 3.1.0 1561 1561 * … … 1588 1588 $offset = ( isset($struct['offset']) ) ? absint($struct['offset']) : 0 ; 1589 1589 $number = ( isset($struct['number']) ) ? absint($struct['number']) : -1 ; 1590 1590 1591 1591 $attachments = get_posts( array('post_type' => 'attachment', 'post_parent' => $parent_id, 'offset' => $offset, 'numberposts' => $number, 'post_mime_type' => $mime_type ) ); 1592 1592 $num_attachments = count($attachments);
Note: See TracChangeset
for help on using the changeset viewer.