Make WordPress Core


Ignore:
Timestamp:
11/17/2010 06:47:34 PM (13 years ago)
Author:
ryan
Message:

Pinking shears

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r16331 r16438  
    14891489     * @since 3.1.0
    14901490     *
    1491      * @param array $args Method parameters. Contains: 
     1491     * @param array $args Method parameters. Contains:
    14921492     *  - blog_id
    14931493     *  - username
    14941494     *  - password
    14951495     *  - attachment_id
    1496      * @return array. Assocciative array containing: 
     1496     * @return array. Assocciative array containing:
    14971497     *  - 'date_created_gmt'
    14981498     *  - 'parent'
     
    15461546    /**
    15471547     * 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
    15501550     * array as last argument.
    1551      * 
     1551     *
    15521552     * Accepted 'filter' keys are 'parent_id', 'mime_type', 'offset', and 'number'.
    1553      * 
     1553     *
    15541554     * The defaults are as follows:
    15551555     * - 'number' - Default is 5. Total number of media items to retrieve.
     
    15571557     * - 'parent_id' - Default is ''. The post where the media item is attached. Empty string shows all media items. 0 shows unattached media items.
    15581558     * - 'mime_type' - Default is ''. Filter by mime type (e.g., 'image/jpeg', 'application/pdf')
    1559      * 
     1559     *
    15601560     * @since 3.1.0
    15611561     *
     
    15881588        $offset = ( isset($struct['offset']) ) ? absint($struct['offset']) : 0 ;
    15891589        $number = ( isset($struct['number']) ) ? absint($struct['number']) : -1 ;
    1590        
     1590
    15911591        $attachments = get_posts( array('post_type' => 'attachment', 'post_parent' => $parent_id, 'offset' => $offset, 'numberposts' => $number, 'post_mime_type' => $mime_type ) );
    15921592        $num_attachments = count($attachments);
Note: See TracChangeset for help on using the changeset viewer.