From 83c20455880fae0f11ed823b8eb9d4a8640d0255 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 22 Aug 2024 23:47:15 +0000 Subject: [PATCH] Docs: Correct inline comment formatting in `redirect_canonical()`. Follow-up to [57357]. See #61608. Built from https://develop.svn.wordpress.org/trunk@58924 git-svn-id: http://core.svn.wordpress.org/trunk@58320 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/canonical.php | 9 +++++---- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 849e15ac76..58723ebc0d 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -553,16 +553,17 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { $attachment_id = get_query_var( 'attachment_id' ); $attachment_post = get_post( $attachment_id ); $attachment_parent_id = $attachment_post ? $attachment_post->post_parent : 0; + $attachment_url = wp_get_attachment_url( $attachment_id ); - $attachment_url = wp_get_attachment_url( $attachment_id ); if ( $attachment_url !== $redirect_url ) { /* - * If an attachment is attached to a post, it inherits the parent post's status. Fetch the - * parent post to check its status later. - */ + * If an attachment is attached to a post, it inherits the parent post's status. + * Fetch the parent post to check its status later. + */ if ( $attachment_parent_id ) { $redirect_obj = get_post( $attachment_parent_id ); } + $redirect_url = $attachment_url; } diff --git a/wp-includes/version.php b/wp-includes/version.php index c4b96a8cf3..447ccadbff 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58923'; +$wp_version = '6.7-alpha-58924'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.