Opened 12 years ago
Closed 9 years ago
#23925 closed defect (bug) (wontfix)
get_post_meta does not check for revision
Reported by: | jfarthing84 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | Posts, Post Types | Keywords: | has-patch close |
Focuses: | Cc: |
Description
Every other *_post_meta function does.
Attachments (1)
Change History (8)
#2
in reply to:
↑ description
@
12 years ago
Replying to kovshenin:
Every other *_post_meta function does.
#4
@
12 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
I'm going to wontfix this. The fact that the meta functions check for revisions was a terrible decision at the time, and was done to cover up misuse of the save_post hook. Changing this could break even more things. Leaving it as is. Eventually we'll fork all of these functions and hopefully do away with these entirely.
#5
follow-up:
↓ 6
@
9 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
Any workaroung ? This seems to be a big bug, which is easy to solve, but wordpress team is not responding...
#6
in reply to:
↑ 5
@
9 years ago
- Component changed from General to Posts, Post Types
- Keywords close added
- Milestone set to Awaiting Review
Replying to katsar0v:
Any workaroung ? This seems to be a big bug, which is easy to solve, but wordpress team is not responding...
There are backwards compatibility concerns, see the response in comment:4.
A workaround is just to check wp_is_post_revision()
in your own code before calling get_post_meta()
.
What is the reasoning behind the proposed change? This will break #20564, #23539 and possibly others.