[wp-trac] [WordPress Trac] #25495: Hook Docs: wp-includes/class-wp.php

WordPress Trac noreply at wordpress.org
Mon Oct 7 22:49:51 UTC 2013


#25495: Hook Docs: wp-includes/class-wp.php
--------------------------+------------------------------
 Reporter:  dougwollison  |       Owner:  DrewAPicture
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Inline Docs   |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by DrewAPicture):

 [attachment: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 `$this` literally 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 `$` in 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_vars` to `$query_vars` above the docblock, just
 like for the `query_vars` filter.

 `parse_request` hook:
 * The parameter is passed via an array so that should be the type assigned
 in the doc.

 `send_headers` hook:
 * Add parenthesis to references to the `send_headers()` function.
 * `&$this` is passed in an array, same as the `parse_request` hook.

 `query_string` filter:
 * Assign `$this->query_string` to `$query_vars` before the docblock.

 `wp` hook:
 * `&$this` is passed in array

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25495#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list