Ticket #9681: 9681.2.patch
File 9681.2.patch, 2.1 KB (added by , 15 years ago) |
---|
-
wp-admin/edit-form-advanced.php
31 31 $messages[9] = sprintf(__('Post scheduled for: <b>%1$s</b>. <a href="%2$s">Preview post</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), get_permalink($post_ID)); 32 32 33 33 if ( isset($_GET['revision']) ) 34 $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); 34 { 35 $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); 36 $messages[10] = sprintf( __('Revision %s (#%d) deleted'), htmlspecialchars($_GET['revisiontitle']), (int) $_GET['revision'] ); 37 } 35 38 36 39 $notice = false; 37 40 $notices[1] = __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>.' ); -
wp-admin/revision.php
18 18 $parent_file = $redirect = 'edit.php'; 19 19 20 20 switch ( $action ) : 21 case 'delete' : // stubs 21 case 'delete' : 22 if ( !$revision = wp_get_post_revision( $revision_id ) ) 23 break; 24 if ( !current_user_can( 'edit_post', $revision->post_parent ) ) 25 break; 26 if ( !$post = get_post( $revision->post_parent ) ) 27 break; 28 if ( !constant('WP_POST_REVISIONS') && !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave 29 break; 30 31 check_admin_referer( "delete-post_$post->ID|$revision->ID" ); 32 33 $revisiontitle = wp_post_revision_title( $revision->ID, false); 34 wp_delete_post_revision( $revision->ID ); 35 $redirect = add_query_arg( array( 'message' => 10, 'revision' => $revision->ID, 'revisiontitle' => urlencode($revisiontitle) ), get_edit_post_link( $post->ID, 'url' ) ); 36 break; 22 37 case 'edit' : 23 38 if ( constant('WP_POST_REVISIONS') ) // stub 24 39 $redirect = remove_query_arg( 'action' );