From 3d58d8a474dfff0a8626e2f9a983bc19482c6af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=8E=9F=E9=9A=86=E5=BF=97?= Date: Thu, 25 Jun 2026 23:09:14 +0900 Subject: [PATCH] Docs: Correct the documented default for `$format` in next-post link functions. The `@param` DocBlock for `$format` in `get_next_post_link()` and `next_post_link()` documented the default as `'« %link'`, but both signatures default to `'%link »'`. The `'« %link'` value is the default for the previous-post functions and was copied onto the next-post functions. The signature default was corrected in [25965] (#25743); the `Default '...'.` notations added later in [37254] (4.6.0) reintroduced the mismatch in the DocBlocks. Update both next-post DocBlocks to match their signatures. Docs only, no functional change. The previous-post functions are already correct. Trac ticket: https://core.trac.wordpress.org/ticket/65541 Co-Authored-By: Claude Opus 4.8 --- src/wp-includes/link-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index cfff8b6525e10..223d6b5548fc6 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -2291,7 +2291,7 @@ function previous_post_link( $format = '« %link', $link = '%title', $in_sa * * @since 3.7.0 * - * @param string $format Optional. Link anchor format. Default '« %link'. + * @param string $format Optional. Link anchor format. Default '%link »'. * @param string $link Optional. Link permalink format. Default '%title'. * @param bool $in_same_term Optional. Whether link should be in the same taxonomy term. * Default false. @@ -2311,7 +2311,7 @@ function get_next_post_link( $format = '%link »', $link = '%title', $in_sa * * @see get_next_post_link() * - * @param string $format Optional. Link anchor format. Default '« %link'. + * @param string $format Optional. Link anchor format. Default '%link »'. * @param string $link Optional. Link permalink format. Default '%title'. * @param bool $in_same_term Optional. Whether link should be in the same taxonomy term. * Default false.