Changeset 48436
- Timestamp:
- 07/11/2020 12:28:07 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/meta-boxes.php
r48422 r48436 1437 1437 1438 1438 $publish_callback_args = array( '__back_compat_meta_box' => true ); 1439 1439 1440 if ( post_type_supports( $post_type, 'revisions' ) && 'auto-draft' !== $post->post_status ) { 1440 1441 $revisions = wp_get_post_revisions( $post->ID, array( 'fields' => 'ids' ) ); … … 1442 1443 // We should aim to show the revisions meta box only when there are revisions. 1443 1444 if ( count( $revisions ) > 1 ) { 1444 reset( $revisions ); // Reset pointer for key().1445 1445 $publish_callback_args = array( 1446 1446 'revisions_count' => count( $revisions ), 1447 'revision_id' => array_shift( $revisions ),1447 'revision_id' => reset( $revisions ), 1448 1448 '__back_compat_meta_box' => true, 1449 1449 ); 1450 1450 1451 add_meta_box( 'revisionsdiv', __( 'Revisions' ), 'post_revisions_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => true ) ); 1451 1452 }
Note: See TracChangeset
for help on using the changeset viewer.