wp_link_pages

函数


wp_link_pages ( $args = '' )
参数
  • (string|array)
    $args
    { Optional. Array or string of default arguments. @type string $before HTML or text to prepend to each link. Default is `

    Pages:`. @type string $after HTML or text to append to each link. Default is `

    `. @type string $link_before HTML or text to prepend to each link, inside the “ tag. Also prepended to the current item, which is not linked. Default empty. @type string $link_after HTML or text to append to each Pages link inside the “ tag. Also appended to the current item, which is not linked. Default empty. @type string $aria_current The value for the aria-current attribute. Possible values are ‘page’, ‘step’, ‘location’, ‘date’, ‘time’, ‘true’, ‘false’. Default is ‘page’. @type string $next_or_number Indicates whether page numbers should be used. Valid values are number and next. Default is ‘number’. @type string $separator Text between pagination links. Default is ‘ ‘. @type string $nextpagelink Link text for the next page link, if available. Default is ‘Next Page’. @type string $previouspagelink Link text for the previous page link, if available. Default is ‘Previous Page’. @type string $pagelink Format string for page numbers. The % in the parameter string will be replaced with the page number, so ‘Page %’ generates “Page 1”, “Page 2”, etc. Defaults to ‘%’, just the page number. @type int|bool $echo Whether to echo or not. Accepts 1|true or 0|false. Default 1|true. }

    Required:
    Default: (empty)
返回值
  • (string) Formatted output in HTML.
定义位置
  • wp-includes/post-template.php
    , line 942
引入
1.2.0
弃用

The formatted output of a list of pages.

Displays page links for paginated posts (i.e. including the `