Changeset 7913 for trunk/wp-admin/revision.php
- Timestamp:
- 05/09/2008 03:59:17 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/revision.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/revision.php
r7907 r7913 2 2 3 3 require_once('admin.php'); 4 5 if ( !constant('WP_POST_REVISIONS') ) { 6 wp_redirect( 'edit.php' ); 7 exit; 8 } 4 9 5 10 wp_reset_vars(array('revision', 'left', 'right', 'action')); … … 9 14 $right = absint($right); 10 15 11 12 16 $parent_file = $redirect = 'edit.php'; 13 $submenu_file = 'edit.php';14 $title = __( 'Post Revision' );15 16 17 17 18 switch ( $action ) : … … 39 40 break; 40 41 41 if ( !current_user_can( ' edit_post', $left_revision->ID ) || !current_user_can( 'edit_post', $right_revision->ID ) )42 if ( !current_user_can( 'read_post', $left_revision->ID ) || !current_user_can( 'read_post', $right_revision->ID ) ) 42 43 break; 43 44 … … 81 82 break; 82 83 83 if ( !current_user_can( ' edit_post', $revision->ID ) || !current_user_can( 'edit_post', $post->ID ) )84 if ( !current_user_can( 'read_post', $revision->ID ) || !current_user_can( 'read_post', $post->ID ) ) 84 85 break; 85 86 … … 96 97 endswitch; 97 98 99 if ( !$redirect && !in_array( $post->post_type, array( 'post', 'page' ) ) ) 100 $redirect = 'edit.php'; 101 98 102 if ( $redirect ) { 99 103 wp_redirect( $redirect ); 100 104 exit; 105 } 106 107 if ( 'page' == $post->post_type ) { 108 $submenu_file = 'edit-pages.php'; 109 $title = __( 'Page Revisions' ); 110 } else { 111 $submenu_file = 'edit.php'; 112 $title = __( 'Post Revisions' ); 101 113 } 102 114 … … 164 176 <br class="clear" /> 165 177 166 <h2><?php _e( 'Post Revisions' ); ?></h2>178 <h2><?php echo $title; ?></h2> 167 179 168 180 <?php
Note: See TracChangeset
for help on using the changeset viewer.