Skip to content

Commit b515d22

Browse files
Docs: Correct inline comment formatting in redirect_canonical().
Follow-up to [57357]. See #61608. git-svn-id: https://develop.svn.wordpress.org/trunk@58924 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6e7b124 commit b515d22

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/wp-includes/canonical.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,17 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
553553
$attachment_id = get_query_var( 'attachment_id' );
554554
$attachment_post = get_post( $attachment_id );
555555
$attachment_parent_id = $attachment_post ? $attachment_post->post_parent : 0;
556+
$attachment_url = wp_get_attachment_url( $attachment_id );
556557

557-
$attachment_url = wp_get_attachment_url( $attachment_id );
558558
if ( $attachment_url !== $redirect_url ) {
559559
/*
560-
* If an attachment is attached to a post, it inherits the parent post's status. Fetch the
561-
* parent post to check its status later.
562-
*/
560+
* If an attachment is attached to a post, it inherits the parent post's status.
561+
* Fetch the parent post to check its status later.
562+
*/
563563
if ( $attachment_parent_id ) {
564564
$redirect_obj = get_post( $attachment_parent_id );
565565
}
566+
566567
$redirect_url = $attachment_url;
567568
}
568569

0 commit comments

Comments
 (0)