WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #24865, comment 11


Ignore:
Timestamp:
08/04/2014 05:03:53 PM (7 years ago)
Author:
kenneyw
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24865, comment 11

    initial v1  
    1616}}}
    1717
     18As an alternative, this works fine:
     19{{{
     20    $(document).on('before-autosave', function(event,data) {
     21        var x = {};
     22        $(".postbox input, .postbox select").each( function(i,el) {
     23                el = $(el);
     24                x[ el.attr('name') ] = el.val();
     25        });
     26        $.extend( data, x );
     27    } );
     28}}}
    1829
     30..except that 'getCompareString' cannot be overriden to include changes in meta values.