WordPress.org

Make WordPress Core

Changeset 31854


Ignore:
Timestamp:
03/20/2015 08:03:04 PM (6 years ago)
Author:
DrewAPicture
Message:

Document default arguments for paginate_links() as a hash notation.

Props atimmer.
Fixes #31433.

File:
1 edited

Legend:

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

    r31452 r31854  
    25792579 * @since 2.1.0
    25802580 *
    2581  * @param string|array $args Optional. Override defaults.
     2581 * @param string|array $args {
     2582 *     Optional. Array or string of arguments for generating paginated links for archives.
     2583 *
     2584 *     @type string $base               Base of the paginated url. Default empty.
     2585 *     @type string $format             Format for the pagination structure. Default empty.
     2586 *     @type int    $total              The total amount of pages. Default is the value WP_Query's
     2587 *                                      `max_num_pages` or 1.
     2588 *     @type int    $current            The current page number. Default is 'paged' query var or 1.
     2589 *     @type bool   $show_all           Whether to show all pages. Default false.
     2590 *     @type int    $end_size           How many numbers on either the start and the end list edges.
     2591 *                                      Default 1.
     2592 *     @type int    $mid_size           How many numbers to either side of the current pages. Default 2.
     2593 *     @type bool   $prev_next          Whether to include the previous and next links in the list. Default true.
     2594 *     @type bool   $prev_text          The previous page text. Default '« Previous'.
     2595 *     @type bool   $next_text          The next page text. Default '« Previous'.
     2596 *     @type string $type               Controls format of the returned value. Possible values are 'plain',
     2597 *                                      'array' and 'list'. Default is 'plain'.
     2598 *     @type array  $add_args           An array of query args to add. Default false.
     2599 *     @type string $add_fragment       A string to append to each link. Default empty.
     2600 *     @type string $before_page_number A string to appear before the page number. Default empty.
     2601 *     @type string $after_page_number  A string to append after the page number. Default empty.
     2602 * }
    25822603 * @return array|string String of page links or array of page links.
    25832604 */
Note: See TracChangeset for help on using the changeset viewer.