[wp-trac] [WordPress Trac] #20495: Update phpDoc to reflect post id or object is valid

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 20 14:48:38 UTC 2012


#20495: Update phpDoc to reflect post id or object is valid
--------------------------+-----------------------------
 Reporter:  coffee2code   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Inline Docs   |    Version:  3.3.1
 Severity:  trivial       |   Keywords:  has-patch
--------------------------+-----------------------------
 Many functions use `get_post()` and do so by simply passing along one of
 their own arguments (typically a post ID). Since `get_post()` accepts
 either a post ID or a post object, those functions therefore can (and do)
 also accept either type of value for the argument.

 The phpDoc for many of the functions simply indicate a post ID is valid.
 The attached patch amends the `@param` doc entry for the relevant
 arguments to indicate either a post ID or post object is valid. (There are
 places where `get_post()` is used but the int arg is otherwise used in the
 function as an int -- I've skipped those since they don't really accept a
 post object.)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20495>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list