From 8a3426bf8b909c983ad830241e14ba73ebccb375 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 15 Nov 2022 00:19:13 +0000 Subject: [PATCH] Docs: Correct type for the `$post` parameter of the `{$adjacent}_post_link` filter. The parameter was documented as `WP_Post`, but it contains the value of `get_adjacent_post()`, which returns an empty string if there is no corresponding post, so the correct type is `WP_Post|string`. Follow-up to [11243], [16951], [28111], [32606]. Props apermo, audrasjb. Fixes #57047. Built from https://develop.svn.wordpress.org/trunk@54841 git-svn-id: http://core.svn.wordpress.org/trunk@54393 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 10 +++++----- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index de9988be1f..533a7daf6c 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -2318,11 +2318,11 @@ function get_adjacent_post_link( $format, $link, $in_same_term = false, $exclude * @since 2.6.0 * @since 4.2.0 Added the `$adjacent` parameter. * - * @param string $output The adjacent post link. - * @param string $format Link anchor format. - * @param string $link Link permalink format. - * @param WP_Post $post The adjacent post. - * @param string $adjacent Whether the post is previous or next. + * @param string $output The adjacent post link. + * @param string $format Link anchor format. + * @param string $link Link permalink format. + * @param WP_Post|string $post The adjacent post. Empty string if no corresponding post exists. + * @param string $adjacent Whether the post is previous or next. */ return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index adc65a9a65..75845df901 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-54840'; +$wp_version = '6.2-alpha-54841'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.