WordPress.org

Make WordPress Core

Changeset 24650


Ignore:
Timestamp:
07/10/13 22:40:42 (2 years ago)
Author:
nacin
Message:

Don't store a revision for the initial call to wp_insert_post(), only on saves.

In core UI (and XML-RPC), we first create an auto-draft via get_default_post_to_edit(), which means the first "save" is in practice the first revision.

This reverts [23842].

fixes #24708.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-filters.php

    r24510 r24650  
    255255add_action( 'plugins_loaded',             'wp_maybe_load_embeds',                     0    ); 
    256256add_action( 'shutdown',                   'wp_ob_end_flush_all',                      1    ); 
    257 add_action( 'wp_insert_post',             'wp_save_post_revision',                   10, 1 ); 
     257add_action( 'post_updated',               'wp_save_post_revision',                   10, 1 ); 
    258258add_action( 'publish_post',               '_publish_post_hook',                       5, 1 ); 
    259259add_action( 'transition_post_status',     '_transition_post_status',                  5, 3 ); 
Note: See TracChangeset for help on using the changeset viewer.