The formatted output of a list of pages.

Displays page links for paginated posts (i.e. includes the <!–nextpage–>. Quicktag one or more times). This tag must be within The Loop.

The defaults for overwriting are: ‘before’ – Default is ‘

Pages:’ (string). The html or text to prepend to each bookmarks. ‘after’ – Default is ‘

‘ (string). The html or text to append to each bookmarks. ‘link_before’ – Default is ” (string). The html or text to prepend to each Pages link inside the <a> tag. Also prepended to the current item, which is not linked. ‘link_after’ – Default is ” (string). The html or text to append to each Pages link inside the <a> tag. Also appended to the current item, which is not linked. ‘next_or_number’ – Default is ‘number’ (string). Indicates whether page numbers should be used. Valid values are number and next. ‘separator’ – Default is ‘ ‘ (string). Text used between pagination links. ‘nextpagelink’ – Default is ‘Next Page’ (string). Text for link to next page. of the bookmark. ‘previouspagelink’ – Default is ‘Previous Page’ (string). Text for link to previous page, if available. ‘pagelink’ – Default is ‘%’ (String).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. ‘echo’ – Default is 1 (integer). When not 0, this triggers the HTML to be echoed and then returned.

Signature

wp_link_pages( $args = '' )
args
 (string|array) Optional. Overwrite the defaults.
Default: ''

Return

(string) Formatted output in HTML.

Source

function wp_link_pages( $args = '' ) {
	$defaults = array(
		'before'           => '<p>' . __( 'Pages:' ),
		'after'            => '</p>',
		'link_before'      => '',
		'link_after'       => '',
		'next_or_number'   => 'number',
		'separator'        => ' ',
		'nextpagelink'     => __( 'Next page' ),
		'previouspagelink' => __( 'Previous page' ),
		'pagelink'         => '%',
		'echo'             => 1
	);

	$r = wp_parse_args( $args, $defaults );

	/**
	 * Filter the arguments used in retrieving page links for paginated posts.
	 *
	 * @since 3.0.0
66 more lines...
WP Trac GitHub

Link here