#25495 closed defect (bug) (fixed)
Hook Docs: wp-includes/class-wp.php
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.8 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Inline Docs | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
Added patch has inline docs for do_parse_request, query_vars, request, parse_request, wp_headers, send_headers, query_string, and wp filters/actions found in wp-includes/class-wp.php.
Attachments (4)
Change History (18)
#1
@
12 years ago
- Keywords needs-patch added
Hi, can you please re-upload your patch in either .diff or .patch format?
#2
@
12 years ago
- Keywords has-patch added; needs-patch removed
- Owner set to DrewAPicture
- Status changed from new to reviewing
#3
@
12 years ago
- Keywords needs-patch added; has-patch removed
Hi, thanks for the new patch. Looks pretty good, just a couple of things to tweak.
Some notes on 25495-patch.diffβ:
- All short descriptions and parameter descriptions should end with a period.
- Add whitespacing per coding standards to the lines containing the
apply_filters()ordo_action()calls (a rare opportunity to do this!).
do_parse_request filter:
- "Test if parse_request should be done." should follow the suggested language of "Filter <this thing>"
- The first parameter needs a description with an ending period. With booleans, we often use language something like "Whether to <something>".
- Move the
@sinceline above the parameter lines.
query_vars filter:
- In the long description, I'd suggest wrapping to a new line after the word "prior".
query_string filter:
- Period missing on the short description
@depreciatedshould be@deprecated, wrap the hook names in single quotes on this line.
#4
@
12 years ago
25495-patch.diffβ is looking much better, just a few things left:
β In the future, it's best not to overwrite the original patch because it makes it difficult track progress and context. If you name the file the same thing but don't check the "overwrite" box on upload, Trac will automatically increment the file name for you :)
General:
- Since
$thisliterally refers to the current instance, should probably replace "object" with "instance" in this frequently used blurb: "The WordPress environment object"
do_parse_request filter:
- Add parenthesis to mentions of the
parse_request()function
query_vars filter:
- If you're going to reference
$public_query_varsin the docblock, it should actually exist. So, for example, you could just do the following before the docblock:$public_query_vars = $this->public_query_vars;
request filter:
- The long description is unnecessary as that's already the nature of a filter.
- Assign
$this->query_varsto$query_varsabove the docblock, just like for thequery_varsfilter.
send_headers hook:
- Add parenthesis to references to the
send_headers()function.
query_string filter:
- Assign
$this->query_stringto$query_stringbefore the docblock.
@
12 years ago
Updated "object" to "instance" when talking about $this. Also added () to function names when mentioning.
#5
follow-up:
βΒ 6
@
12 years ago
I've made the fixes. However, with regard to saying it's passed as an array, it's technically not; any callbacks that use the hook get the array elements as the separate arguments. @johnbillion brought this up on #25514 and agreed with me: βhttp://core.trac.wordpress.org/ticket/25514#comment:2.
#6
in reply to:
βΒ 5
@
12 years ago
Replying to dougwollison:
I've made the fixes. However, with regard to saying it's passed as an array, it's technically not; any callbacks that use the hook get the array elements as the separate arguments. @johnbillion brought this up on #25514 and agreed with me: βhttp://core.trac.wordpress.org/ticket/25514#comment:2.
You are correct, and I agree.
#7
@
12 years ago
- Keywords has-patch commit added; needs-patch removed
- Milestone changed from Awaiting Review to 3.8
Did some language cleanup in 25495.patchβ.
#8
@
12 years ago
25495.patchβ looks good. Recommend commit.
WordPress environment setup class. (With inline docs for hooks)