[wp-trac] [WordPress Trac] #20564: Framework for storing revisions of Post Meta
WordPress Trac
noreply at wordpress.org
Thu Apr 4 00:26:12 UTC 2013
#20564: Framework for storing revisions of Post Meta
-------------------------------------------------+------------------
Reporter: alexkingorg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.6
Component: Revisions | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-codex |
-------------------------------------------------+------------------
Comment (by azaozz):
> We can indeed check the emptiness of meta before storing their revisions
to save some space, but I have mixed feelings about it.
What I mean is at the lowest level: we know the expected keys, so `array(
'a' => '', 'b' => '', 'c' => 'something' );` doesn't have to be
serialized, saved to the db and unserialized again when getting the data.
We can remove the empty keys, save `array( 'c' => 'something' );` and then
add the empty keys on getting the data. This will work in exactly the same
way as saving the original array.
> I can try and answer this with a similar question :) When restoring from
a revision, do empty fields (title or content) overwrite the corresponding
values in the main post?
That's not exactly the same. From the discussion on #19570, we are keeping
the unused data for post formats. Basically this is irrelevant post meta
unless the user decides to switch back to a previously used post format.
The question here is: do we "roll back" that irrelevant data when
restoring a revision, and yes, logically we should.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20564#comment:57>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list