Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20299, comment 44


Ignore:
Timestamp:
01/19/2014 10:12:30 PM (10 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20299, comment 44

    initial v1  
    33For drafts this works well. It is equal to clicking Save Draft + View Post in a new tab. All data from all form fields (including those added by plugins) is saved.
    44
    5 However for published posts this is not ideal. The filters that run on updating and inserting posts can trigger all sorts of related tasks and many plugin authors are not aware that the post is not being updated, only previewed.
     5However for published posts this is not ideal. The filters that run on updating and inserting posts can trigger all sorts of related tasks and many plugins are not aware that the post is not being updated, only previewed.
    66
    77This needs standardizing. Thinking that best would be to limit what is being submitted on clicking "Preview" and "Preview Changes" only to post_title, post_content and excerpt. Then add a filter for additional form fields that will be saved and included in the preview. This could work by filtering `$_POST`. Even maybe set `DOING_AUTOSAVE` or perhaps `DOING_PREVIEW`.