WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/27/2013 08:21:38 PM (8 years ago)
Author:
markjaquith
Message:

Fix a longstanding "off by one" revision authorship bug.

  • Fixes old revision data on the fly when you open a post for editing.
  • Uses post_name of revisions to store a post version number (-v1), so we know what has been fixed.
  • Latest version should also have a revision stored, whereas before it did not.

props adamsilverstein, mdawaffe. fixes #16215.

File:
1 edited

Legend:

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

    r23805 r23823  
    251251add_action( 'plugins_loaded',             'wp_maybe_load_embeds',                     0    );
    252252add_action( 'shutdown',                   'wp_ob_end_flush_all',                      1    );
    253 add_action( 'pre_post_update',            'wp_save_post_revision',                   10, 2 );
     253add_action( 'post_updated',               'wp_save_post_revision',                   10, 1 );
    254254add_action( 'publish_post',               '_publish_post_hook',                       5, 1 );
    255255add_action( 'transition_post_status',     '_transition_post_status',                  5, 3 );
Note: See TracChangeset for help on using the changeset viewer.