[wp-trac] [WordPress Trac] #13382: _wp_post_revision_fields filter is not very useful
WordPress Trac
noreply at wordpress.org
Fri Mar 7 21:02:05 UTC 2014
#13382: _wp_post_revision_fields filter is not very useful
-------------------------+-----------------------------
Reporter: mdawaffe | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Revisions | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+-----------------------------
Comment (by adamsilverstein):
Replying to [ticket:13382 mdawaffe]:
> The _wp_post_revision_fields filter allows plugins to modify which post
fields get revisioned (the default is title, content, excerpt).
>
> It's pretty useless, though, since it's only run once and can't be
changed by post_type. A custom post type, for example, might only want to
enable revisions on the content.
>
would passing the post object or id to the filter be enough to resolve
this? i'm unclear on why 'running only once' is an issue?
> The _wp_post_revision_fields() is also a variation on the getter/setter
pattern (static variable) we use in a few places to avoid globals. It
makes the function kind of crazy.
Not sure what this part means or what you are proposing changes here,
please elaborate if possible.
Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/13382#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list