Opened 15 years ago
Closed 15 years ago
#12827 closed defect (bug) (fixed)
get_post_type() is incorrect
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
The inline documentation for get_post_type()
is incorrect in stating that the function uses the current post if none is specified.
Either the function needs to be changed to use the current post, or the inline documentation needs to be correct. As nacin pointed out, the function is @since 2.1.0
, so the former is most likely a bad idea.
I think the function should be deprecated in favour of a function that has the correct functionality, and the old function's documentation should be corrected.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Corrected version of the original function, so it matches the phpDoc