Plugin Directory

Changeset 713239


Ignore:
Timestamp:
05/15/2013 03:10:17 AM (13 years ago)
Author:
dllh
Message:

Our method of checking to see if an update was an autosave or not was faulty. Autosaves have $_POSTautosave?, so check that instead so that we don't send an email every time an autosave is recorded when the "send on draft" box is ticked.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • email-post-changes/trunk/class.email-post-changes.php

    r704854 r713239  
    6969            return;
    7070                   
    71         if ( wp_is_post_autosave( $post_after ) )
    72             return;
    73 
    74         // Our inputs are just the raw post data from before and after, so the wp_is_post_autosave() check,
    75         // which looks for {$post->post_parent}-autosave in the post_name, may not work. Check this too just to be safe.
    76         if ( 'auto-draft' == $post_before->post_status || 'auto-draft' == $post_after->post_status )
     71        if ( isset( $_POST['autosave'] ) )
    7772            return;
    7873
Note: See TracChangeset for help on using the changeset viewer.