Opened 8 weeks ago
Closed 7 weeks ago
#63496 closed defect (bug) (fixed)
Document global variables comment code improvement.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | needs-refresh |
Focuses: | docs | Cc: |
Description
I have reviewed the below file code and found that we are using a global $wp_version variable. but they do not mention it in the function comment. Also one more $wp_theme_directories global variable used. but they do not mention in the function comment. So I think we need to improve the function comment code.
Files:
1) wp-admin/includes/update-core.php
2) wp-includes/theme.php
Attachments (3)
Change History (12)
#1
@
8 weeks ago
- Keywords needs-refresh added
- Version trunk deleted
Hi there!
Thanks for ticket and patch. The indention is not correct in wp-admin/includes/update-core.php
that needs to correct.
#2
follow-up:
↓ 5
@
8 weeks ago
$wp_version
can't be globalised here. There's an inline comment about it: https://github.com/WordPress/wordpress-develop/blob/5c519f8f7c8cd89b8cdcf1a6110fdce2d1f9bde3/src/wp-admin/includes/update-core.php#L1089-L1090
#3
@
7 weeks ago
- Milestone changed from Awaiting Review to 6.9
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#5
in reply to:
↑ 2
;
follow-up:
↓ 6
@
7 weeks ago
Replying to johnbillion:
$wp_version
can't be globalised here. There's an inline comment about it
I think the patch aims to document the existing $GLOBALS['wp_version']
reference in line 1121.
#6
in reply to:
↑ 5
;
follow-up:
↓ 7
@
7 weeks ago
Replying to SergeyBiryukov:
I think the patch aims to document the existing
$GLOBALS['wp_version']
reference in line 1121.
Seeing as that explicitly uses the $GLOBALS
superglobal I would say it doesn't need documenting as a global.
#7
in reply to:
↑ 6
;
follow-up:
↓ 8
@
7 weeks ago
Replying to johnbillion:
Seeing as that explicitly uses the
$GLOBALS
superglobal I would say it doesn't need documenting as a global.
That would be inconsistent with the rest of core though, we do document these $GLOBALS
references pretty much everywhere :)
@
7 weeks ago
I have reviewed above mentioned issue and founds few files. Here, I have added its patch.
patch Added.