Make WordPress Core

Opened 5 months ago

Last modified 5 months ago

#63745 new enhancement

Suggestion Regarding PHPDoc Usage for $GLOBALS in WordPress Core

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch dev-feedback 2nd-opinion
Focuses: docs Cc:

Description

Hello Team,

I hope you're doing well.

While reviewing the WordPress Core files, I noticed the usage of PHPDoc blocks for certain global variables like "_wp_tests_development_mode". However, I found that other global variables such as debug are not consistently documented using PHPDoc.

I believe adding PHPDoc comments for these globals can improve code readability, assist with static analysis tools, and enhance overall documentation clarity. It might be worth considering standardizing this across the Core codebase.

Thank you

Attachments (1)

63745.patch (941 bytes) - added by viralsampat 5 months ago.
I have checked above mentioned issue and resolved it. Here, I have added my patch.

Download all attachments as: .zip

Change History (2)

@viralsampat
5 months ago

I have checked above mentioned issue and resolved it. Here, I have added my patch.

#1 @sabernhardt
5 months ago

  • Keywords 2nd-opinion added; needs-testing removed

#60021 proposed documenting $_wp_tests_development_mode, but the ticket was closed without updating that.

  • If it should be done, the @global would belong before @return, as in 60021.16.patch.
  • [56042] added the global variable.

[19935] deprecated the debug_fwrite() function, and the $debug variable could have been either 1 or true (int|bool).

Note: See TracTickets for help on using tickets.