WordPress.org

Make WordPress Core

Changeset 28476


Ignore:
Timestamp:
05/18/2014 05:19:56 PM (7 years ago)
Author:
DrewAPicture
Message:

Improve inline documentation for default arguments in wp_get_archives().

See #28298.

File:
1 edited

Legend:

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

    r28397 r28476  
    11501150 * Display archive links based on type and format.
    11511151 *
    1152  * The 'type' argument offers a few choices and by default will display monthly
    1153  * archive links. The other options for values are 'daily', 'weekly', 'monthly',
    1154  * 'yearly', 'postbypost' or 'alpha'. Both 'postbypost' and 'alpha' display the
    1155  * same archive link list, the difference between the two is that 'alpha'
    1156  * will order by post title and 'postbypost' will order by post date.
    1157  *
    1158  * The date archives will logically display dates with links to the archive post
    1159  * page. The 'postbypost' and 'alpha' values for 'type' argument will display
    1160  * the post titles.
    1161  *
    1162  * The 'limit' argument will only display a limited amount of links, specified
    1163  * by the 'limit' integer value. By default, there is no limit. The
    1164  * 'show_post_count' argument will show how many posts are within the archive.
    1165  * By default, the 'show_post_count' argument is set to false.
    1166  *
    1167  * For the 'format', 'before', and 'after' arguments, see {@link
    1168  * get_archives_link()}. The values of these arguments have to do with that
    1169  * function.
    1170  *
    11711152 * @since 1.2.0
    11721153 *
    1173  * @param string|array $args Optional. Override defaults.
     1154 * @see get_archives_link()
     1155 *
     1156 * @param string|array $args {
     1157 *     Default archive links arguments. Optional.
     1158 *
     1159 *     @type string     $type            Type of archive to retrieve. Accepts 'daily', 'weekly', 'monthly',
     1160 *                                       'yearly', 'postbypost', or 'alpha'. Both 'postbypost' and 'alpha'
     1161 *                                       display the same archive link list as well as post titles instead
     1162 *                                       of displaying dates. The difference between the two is that 'alpha'
     1163 *                                       will order by post title and 'postbypost' will order by post date.
     1164 *                                       Default 'monthly'.
     1165 *     @type string|int $limit           Number of links to limit the query to. Default empty (no limit).
     1166 *     @type string     $format          Format each link should take using the $before and $after args.
     1167 *                                       Accepts 'link' (`<link>` tag), 'option' (`<option>` tag), 'html'
     1168 *                                       (`<li>` tag), or a custom format, which generates a link anchor
     1169 *                                       with $before preceding and $after succeeding. Default 'html'.
     1170 *     @type string     $before          Markup to prepend to the beginning of each link. Default empty.
     1171 *     @type string     $after           Markup to append to the end of each link. Default empty.
     1172 *     @type bool       $show_post_count Whether to display the post count alongside the link. Default false.
     1173 *     @type bool       $echo            Whether to echo or return the links list. Default 1|true to echo.
     1174 *     @type string     $order           Whether to use ascending or descending order. Accepts 'ASC', or 'DESC'.
     1175 *                                       Default 'DESC'.
     1176 * }
    11741177 * @return string|null String when retrieving, null when displaying.
    11751178 */
Note: See TracChangeset for help on using the changeset viewer.