diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
index 36dec909ac..e49cdd2164 100644
--- a/src/wp-includes/post-template.php
+++ b/src/wp-includes/post-template.php
@@ -862,6 +862,7 @@ function post_password_required( $post = null ) {
* Quicktag one or more times). This tag must be within The Loop.
*
* @since 1.2.0
+ * @since 5.0.0 Added the `aria_current` argument.
*
* @global int $page
* @global int $numpages
@@ -877,6 +878,8 @@ function post_password_required( $post = null ) {
* 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 ' '.
@@ -893,10 +896,11 @@ function wp_link_pages( $args = '' ) {
global $page, $numpages, $multipage, $more;
$defaults = array(
- 'before' => ' ' . __( 'Pages:' ),
+ 'before' => ' Pages: 1 {$page2}2
Pages: 1 | {$page2}2 | {$page3}3
"; + $separator = "Pages: 1 | {$page2}2 | {$page3}3
"; $output = wp_link_pages( array( 'echo' => 0, @@ -117,7 +117,7 @@ class Tests_Post_Template extends WP_UnitTestCase { $this->assertEquals( $separator, $output ); - $pagelink = " Page 1 | {$page2}Page 2 | {$page3}Page 3"; + $pagelink = " Page 1 | {$page2}Page 2 | {$page3}Page 3"; $output = wp_link_pages( array( 'echo' => 0,