wp/wp-admin/revision.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   106 		$post_edit_link = get_edit_post_link();
   106 		$post_edit_link = get_edit_post_link();
   107 		$post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
   107 		$post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
   108 		/* translators: %s: Post title. */
   108 		/* translators: %s: Post title. */
   109 		$h1             = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' ), $post_title );
   109 		$h1             = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' ), $post_title );
   110 		$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Go to editor' ) . '</a>';
   110 		$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Go to editor' ) . '</a>';
   111 		$title          = __( 'Revisions' );
   111 		// Used in the HTML title tag.
       
   112 		$title = __( 'Revisions' );
   112 
   113 
   113 		$redirect = false;
   114 		$redirect = false;
   114 		break;
   115 		break;
   115 }
   116 }
   116 
   117 
   123 	wp_redirect( $redirect );
   124 	wp_redirect( $redirect );
   124 	exit;
   125 	exit;
   125 }
   126 }
   126 
   127 
   127 // This is so that the correct "Edit" menu item is selected.
   128 // This is so that the correct "Edit" menu item is selected.
   128 if ( ! empty( $post->post_type ) && 'post' != $post->post_type ) {
   129 if ( ! empty( $post->post_type ) && 'post' !== $post->post_type ) {
   129 	$parent_file = 'edit.php?post_type=' . $post->post_type;
   130 	$parent_file = 'edit.php?post_type=' . $post->post_type;
   130 } else {
   131 } else {
   131 	$parent_file = 'edit.php';
   132 	$parent_file = 'edit.php';
   132 }
   133 }
   133 $submenu_file = $parent_file;
   134 $submenu_file = $parent_file;