[wp-trac] [WordPress Trac] #24865: Allow plugins to hook into autosave and include field data from the autosave with the package.

WordPress Trac noreply at wordpress.org
Mon Aug 4 16:33:33 UTC 2014


#24865: Allow plugins to hook into autosave and include field data from the
autosave with the package.
------------------------------------+------------------------------
 Reporter:  nerrad                  |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Autosave                |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by kenneyw):

 It appears this is still not incorporated in WP 3.9.1.

 If the above solution is not going to make it into WP, at least refactor
 autosave.js
 to use 'this.getPostData' rather than 'getPostData' etc. What's the point
 of exporting
 it in the window.wp.autosave structure if changing it has no effect?

 What I want to do a plugin script is something like:

 {{{
     var as_getPostData = window.wp.autosave.getPostData;
     window.wp.autosave.getPostData = function() {
         var ret = as_getPostData.apply( this/*?*/, arguments );
         // append my metabox input fields
         return ret;
     };
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24865#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list