Opened 13 years ago
Closed 12 years ago
#19932 closed enhancement (fixed)
Pass post ID to post revision field filter
Reported by: | pollett | Owned by: | westi |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Revisions | Keywords: | has-patch |
Focuses: | Cc: |
Description
When viewing a post revision, for each field the filter
_wp_post_revision_field_xx
is called. This is passed the field name and value as parameters but not the post ID that it's working with, this allows you to modify the value based on it's currently contents but not based on the post ID i.e. to inject new fields into the diff.
Proposal that the post ID also be passed to this filter rather than having to hack around it by making $left and $right global.
Attachments (3)
Change History (10)
#5
@
12 years ago
- Cc erick@… added
In 19932.1.patch, I refreshed the patch and added the entire revision to the third instance of the filter. I also added the revision side to the uses, or an empty string when not in a diff
.
Note: See
TracTickets for help on using
tickets.
Add post ID to revision field filter