Warning: This function has been deprecated. Use wp_link_pages() instead.
link_pages() WordPress Function
The link_pages() function is used to create a list of links to the pages in a post. It is useful for creating a table of contents for a long post. The function can be used with or without a format parameter. If no format parameter is specified, the function will return a list of links to the pages in the post.
link_pages( string $before = '<br />', string $after = '<br />', string $next_or_number = 'number', string $nextpagelink = 'next page', string $previouspagelink = 'previous page', string $pagelink = '%', string $more_file = '' ) #
Print list of pages based on arguments.
Description
See also
Parameters
- $before
(string)(Optional)
Default value: '<br />'
- $after
(string)(Optional)
Default value: '<br />'
- $next_or_number
(string)(Optional)
Default value: 'number'
- $nextpagelink
(string)(Optional)
Default value: 'next page'
- $previouspagelink
(string)(Optional)
Default value: 'previous page'
- $pagelink
(string)(Optional)
Default value: '%'
- $more_file
(string)(Optional)
Default value: ''
Return
(string)
Source
File: wp-includes/deprecated.php
function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
$pagelink='%', $more_file='') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );
$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
return wp_link_pages($args);
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Use wp_link_pages() |
| 0.71 | Introduced. |