Make WordPress Core


Ignore:
Timestamp:
01/18/2010 11:44:51 AM (16 years ago)
Author:
dd32
Message:

Introduce Revisioning for custom Post Types, Introduce 'supports' argument to register_post_type() to wrap add_post_type_support(), Whitespace additions to create_initial_post_types(). See #9674. Fixes #11703

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r12680 r12751  
    12611261
    12621262    switch ( $type ) {
    1263     case 'autosave' :
    1264         if ( !$autosave = wp_get_post_autosave( $post->ID ) )
    1265             return;
    1266         $revisions = array( $autosave );
    1267         break;
    1268     case 'revision' : // just revisions - remove autosave later
    1269     case 'all' :
    1270     default :
    1271         if ( !$revisions = wp_get_post_revisions( $post->ID ) )
    1272             return;
    1273         break;
     1263        case 'autosave' :
     1264            if ( !$autosave = wp_get_post_autosave( $post->ID ) )
     1265                return;
     1266            $revisions = array( $autosave );
     1267            break;
     1268        case 'revision' : // just revisions - remove autosave later
     1269        case 'all' :
     1270        default :
     1271            if ( !$revisions = wp_get_post_revisions( $post->ID ) )
     1272                return;
     1273            break;
    12741274    }
    12751275
     
    13271327        <input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Compare Revisions' ); ?>" />
    13281328        <input type="hidden" name="action" value="diff" />
     1329        <input type="hidden" name="post_type" value="<?php echo esc_attr($GLOBALS['post_type']); ?>" />
    13291330    </div>
    13301331</div>
Note: See TracChangeset for help on using the changeset viewer.