Make WordPress Core

Changeset 23631


Ignore:
Timestamp:
03/06/2013 11:55:54 PM (12 years ago)
Author:
nacin
Message:

Use auto-draft rather than post_ID = 0 to detect whether we are adding a new post. see #23665.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r23615 r23631  
    169169}
    170170
    171 // TODO review this count() - why do we need to add it?
    172 if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && count ( wp_get_post_revisions( $post_ID ) ) > 1 )
     171// We should aim to show the revisions metabox only when there are revisions.
     172if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status && count( wp_get_post_revisions( $post_ID ) ) > 1 )
    173173    add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core');
    174174
Note: See TracChangeset for help on using the changeset viewer.