From d66fffa31be36d39fe0cb6be7126617a88b1bdb0 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 20 Mar 2015 20:03:04 +0000 Subject: [PATCH] Document default arguments for `paginate_links()` as a hash notation. Props atimmer. Fixes #31433. git-svn-id: https://develop.svn.wordpress.org/trunk@31854 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 02e45d52fd..9139874a23 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -2578,7 +2578,28 @@ function language_attributes($doctype = 'html') { * * @since 2.1.0 * - * @param string|array $args Optional. Override defaults. + * @param string|array $args { + * Optional. Array or string of arguments for generating paginated links for archives. + * + * @type string $base Base of the paginated url. Default empty. + * @type string $format Format for the pagination structure. Default empty. + * @type int $total The total amount of pages. Default is the value WP_Query's + * `max_num_pages` or 1. + * @type int $current The current page number. Default is 'paged' query var or 1. + * @type bool $show_all Whether to show all pages. Default false. + * @type int $end_size How many numbers on either the start and the end list edges. + * Default 1. + * @type int $mid_size How many numbers to either side of the current pages. Default 2. + * @type bool $prev_next Whether to include the previous and next links in the list. Default true. + * @type bool $prev_text The previous page text. Default '« Previous'. + * @type bool $next_text The next page text. Default '« Previous'. + * @type string $type Controls format of the returned value. Possible values are 'plain', + * 'array' and 'list'. Default is 'plain'. + * @type array $add_args An array of query args to add. Default false. + * @type string $add_fragment A string to append to each link. Default empty. + * @type string $before_page_number A string to appear before the page number. Default empty. + * @type string $after_page_number A string to append after the page number. Default empty. + * } * @return array|string String of page links or array of page links. */ function paginate_links( $args = '' ) {