[wp-trac] [WordPress Trac] #22289: Filter to override WP_POST_REVISIONS (or define it later)
WordPress Trac
noreply at wordpress.org
Mon Jan 21 10:35:13 UTC 2013
#22289: Filter to override WP_POST_REVISIONS (or define it later)
-------------------------------------------------+-------------------------
Reporter: batmoo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Revisions | Review
Severity: normal | Version: 3.4.2
Keywords: needs-patch westi-likes, | Resolution:
revisions-3.6 |
-------------------------------------------------+-------------------------
Changes (by westi):
* keywords: => needs-patch westi-likes, revisions-3.6
Comment:
In general I think it would be good to move away from using a CONSTANT
here and instead have two new functions called something like
{{{wp_revisions_enabled}}} and {{{wp_number_of_revisions_to_keep}}}.
We can then have a filter in both of these functions and use the CONSTANT
if defined or fall back to the default behaviour.
Using a CONSTANT throughout the code for this was a mistake.
Patches entertained with interest.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22289#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list