Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#54746 closed task (blessed) (fixed)

Comment Error in wp-login.php

Reported by: alkesh7 Owned by: SergeyBiryukov
Priority: normal Milestone: 6.0
Component: Login and Registration Version:
Severity: minor Keywords:
Cc: Focuses: docs, coding-standards

Description

Hello WordPress Team,

I have seen that WordPress have issue in the comment structure.

WordPress follow a comment structure. See the Comment Standard link: https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments

In the WordPress 5.9 Release Candidate Version. There is a Comment structure issue in file "wp-login.php" in root folder. See the issue in the below screenshot.
https://prnt.sc/263q9qs

Kindly take a look on my request and fix it.

Thank you!

Attachments (3)

wp-login.php.patch (347 bytes ) - added by alkesh7 5 years ago.
wp-org-ticket.png (53.5 KB ) - added by alkesh7 5 years ago.
54746.diff (1.0 KB ) - added by peterwilsoncc 4 years ago.

Download all attachments as: .zip

Change History (14)

@alkesh7
5 years ago

#1 @audrasjb
5 years ago

  • Milestone Awaiting Review6.0

Hello and welcome back to Trac!
As we entered release candidate cycle for 5.9, let's address this in 6.0.

#2 @Presskopp
5 years ago

Oh, we have this in many many places!

This ticket was mentioned in Slack in #docs by presskopp. View the logs.


5 years ago

This ticket was mentioned in Slack in #core-coding-standards by presskopp. View the logs.


5 years ago

#5 @audrasjb
5 years ago

  • Component CommentsLogin and Registration
  • Focuses docs added
  • Version trunk

#6 @peterwilsoncc
4 years ago

@Presskopp Yes, it's in several places in core. I found it in 49 files but some of those were third party libraries.

For the purposes of this ticket, let's focus on wp-login.php and any further fixes can go on the generic coding standards fixes ticket #54728.

@peterwilsoncc
4 years ago

#7 @peterwilsoncc
4 years ago

  • Owner set to peterwilsoncc
  • Resolutionfixed
  • Status newclosed

In 52945:

Registration/Login: Coding standards fixes for wp-login.php.

Props alkesh7, Presskopp, audrasjb.
Fixes #54746.
See #54728.

#8 follow-up: @SergeyBiryukov
4 years ago

  • Resolution fixed
  • Status closedreopened

I think comments like "Main" have some benefit, as they denote various parts of the file, in this case separating function declarations from the main part.

Instead of removing them, I think we can convert them to the multi-line format per the documentation standards:

/*
 * Main.
 */

#9 in reply to: ↑ 8 @peterwilsoncc
4 years ago

  • Keywords has-patch removed
  • Owner changed from peterwilsoncc to SergeyBiryukov
  • Status reopenedassigned

Replying to SergeyBiryukov:

I think comments like "Main" have some benefit, as they denote various parts of the file, in this case separating function declarations from the main part.

With the additional context they do, on it's own the word main is meaningless.

Instead of removing them, I think we can convert them to the multi-line format per the documentation standards:

/*
 * Main.
 */

The point is to meet the coding standards by avoiding single line comments of that format. Given that the additional context is needed for the comment to make sense, I think it best revised as a multi-line comment anyway.

#10 @costdev
4 years ago

  • Type enhancementtask (blessed)

#11 @SergeyBiryukov
4 years ago

  • Resolutionfixed
  • Status assignedclosed

In 53313:

Docs: Further clarify a comment for the main part of wp-login.php.

Follow-up to [52945].

Fixes #54746.

Note: See TracTickets for help on using tickets.