Opened 9 years ago
Closed 9 years ago
#34480 closed enhancement (duplicate)
get_the_content inconsistent with get_the_title
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Posts, Post Types | Keywords: | has-patch 2nd-opinion |
Focuses: | template | Cc: |
Description
get_the_title accepts a post id parameter, to target a specific post outside of the loop; one would assume that get_the_content would work the same way.
That is not the case.
get_the_content does not currently accept a post id as the first parameter - which goes against what would be assumed after having used get_the_title.
TLDR: add post id parameter to get_the_content.
Attachments (2)
Change History (7)
#3
@
9 years ago
- Keywords has-patch 2nd-opinion added
34480.diff add the additional id param to both get_the_content and get_the_excerpt. It is a bit strange that they are in different positions (second and third) and after deprecated params but the use case seems to make sense.
Note: See
TracTickets for help on using
tickets.
Note:
get_the_excerpt()
doesn't support a post parameter either. It has a deprecated function argument though.