WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20564, comment 57


Ignore:
Timestamp:
04/04/13 02:09:33 (2 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20564, comment 57

    initial v1  
    33What 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. 
    44 
     5The same is true when getting/setting the post format meta on revision posts. We know there are 7 meta keys, no need to add the empty. 
     6 
    57> 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? 
    68