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/post.php

    r23740 r23823  
    30133013 */
    30143014function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent ) {
    3015     if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) )
     3015    if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) || ( 'inherit' == $post_status && 'revision' == $post_type ) )
    30163016        return $slug;
    30173017
Note: See TracChangeset for help on using the changeset viewer.