Changeset 23929 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 04/06/2013 11:43:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r23886 r23929 228 228 } 229 229 230 // We should aim to show the revisions metabox only when there are revisions. 231 if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status && count( wp_get_post_revisions( $post_ID ) ) > 1 ) 232 add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core'); 230 if ( post_type_supports($post_type, 'revisions') && 'auto-draft' != $post->post_status ) { 231 $revisions = wp_get_post_revisions( $post_ID ); 232 233 // Check if the revisions have been upgraded 234 if ( ! empty( $revisions ) && _wp_get_post_revision_version( reset( $revisions ) ) < 1 ) 235 _wp_upgrade_revisions_of_post( $post, $revisions ); 236 237 // We should aim to show the revisions metabox only when there are revisions. 238 if ( count( $revisions ) > 1 ) 239 add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core'); 240 } 233 241 234 242 do_action('add_meta_boxes', $post_type, $post);
Note: See TracChangeset
for help on using the changeset viewer.