Changeset 24790 for trunk/wp-includes/revision.php
- Timestamp:
- 07/24/2013 06:08:14 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/revision.php
r24520 r24790 158 158 */ 159 159 function wp_get_post_autosave( $post_id, $user_id = 0 ) { 160 $revisions = wp_get_post_revisions( $post_id);160 $revisions = wp_get_post_revisions( $post_id, array( 'check_enabled' => false ) ); 161 161 162 162 foreach ( $revisions as $revision ) { … … 370 370 function wp_get_post_revisions( $post_id = 0, $args = null ) { 371 371 $post = get_post( $post_id ); 372 if ( ! $post || empty( $post->ID ) || ! wp_revisions_enabled( $post ))372 if ( ! $post || empty( $post->ID ) ) 373 373 return array(); 374 374 375 $defaults = array( 'order' => 'DESC', 'orderby' => 'date' );375 $defaults = array( 'order' => 'DESC', 'orderby' => 'date', 'check_enabled' => true ); 376 376 $args = wp_parse_args( $args, $defaults ); 377 378 if ( $args['check_enabled'] && ! wp_revisions_enabled( $post ) ) 379 return array(); 380 377 381 $args = array_merge( $args, array( 'post_parent' => $post->ID, 'post_type' => 'revision', 'post_status' => 'inherit' ) ); 378 382
Note: See TracChangeset
for help on using the changeset viewer.