WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/11/2014 11:02:51 PM (7 years ago)
Author:
DrewAPicture
Message:

Convert default arguments documentation for get_bookmarks() into a hash notation.

Props coffee2code for the initial patch.
See #28841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/bookmark.php

    r28712 r29111  
    9292 * results will be stored to the cache.
    9393 *
    94  * List of default arguments are as follows:
    95  * 'orderby' - Default is 'name' (string). How to order the links by. String is
    96  *      based off of the bookmark scheme.
    97  * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either
    98  *      ascending or descending order.
    99  * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to
    100  *      display.
    101  * 'category' - Default is empty string (string). Include the links in what
    102  *      category ID(s).
    103  * 'category_name' - Default is empty string (string). Get links by category
    104  *      name.
    105  * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide
    106  *      links marked as 'invisible'.
    107  * 'show_updated' - Default is 0 (integer). Will show the time of when the
    108  *      bookmark was last updated.
    109  * 'include' - Default is empty string (string). Include bookmark ID(s)
    110  *      separated by commas.
    111  * 'exclude' - Default is empty string (string). Exclude bookmark ID(s)
    112  *      separated by commas.
    113  *
    11494 * @since 2.1.0
    115  * @uses $wpdb Database Object
    116  * @link http://codex.wordpress.org/Template_Tags/get_bookmarks
    117  *
    118  * @param string|array $args List of arguments to overwrite the defaults
    119  * @return array List of bookmark row objects
     95 *
     96 * @global wpdb $wpdb WordPress database access abstraction object.
     97 *
     98 * @param string|array $args {
     99 *     Optional. String or array of arguments to retrieve bookmarks.
     100 *
     101 *     @type string   $orderby        How to order the links by. Accepts post fields. Default 'name'.
     102 *     @type string   $order          Whether to order bookmarks in ascending or descending order.
     103 *                                    Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'.
     104 *     @type int      $limit          Amount of bookmarks to display. Accepts 1+ or -1 for all.
     105 *                                    Default -1.
     106 *     @type string   $category       Comma-separated list of category ids to include links from.
     107 *                                    Default empty.
     108 *     @type string   $category_name  Category to retrieve links for by name. Default empty.
     109 *     @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts
     110 *                                    1|true or 0|false. Default 1|true.
     111 *     @type int|bool $show_updated   Whether to display the time the bookmark was last updated.
     112 *                                    Accepts 1|true or 0|false. Default 0|false.
     113 *     @type string   $include        Comma-separated list of bookmark IDs to include. Default empty.
     114 *     @type string   $exclude        Comma-separated list of bookmark IDs to exclude. Default empty.
     115 * }
     116 * @return array List of bookmark row objects.
    120117 */
    121118function get_bookmarks( $args = '' ) {
Note: See TracChangeset for help on using the changeset viewer.