Better notice and link after post/page saving. Props mdawaffe. fixes #1690

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2006-10-04 07:47:20 +00:00
parent 6b08dcf49f
commit e219fa9656
2 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ require_once('admin-header.php');
?>
<?php if ( isset($_GET['saved']) ) : ?>
<div id="message" class="updated fade"><p><strong><?php _e('Page saved.') ?> <a href="edit-pages.php"><?php _e('Manage pages'); ?> &raquo;</a></strong></p></div>
<div id="message" class="updated fade"><p><strong><?php _e('Page saved.') ?></strong> <a href="edit-pages.php"><?php _e('Manage pages'); ?></a> | <a href="<?php echo get_page_link( $_GET['saved'] ); ?>"><?php _e('View page'); ?> &raquo;</a></p></div>
<?php endif; ?>
<?php
@ -20,4 +20,4 @@ if ( current_user_can('edit_pages') ) {
}
?>
<?php include('admin-footer.php'); ?>
<?php include('admin-footer.php'); ?>

View File

@ -48,11 +48,11 @@ case 'post':
break;
}
} else {
$location = 'post.php?posted=true';
$location = "post.php?posted=$post_ID";
}
if ( 'static' == $_POST['post_status'] )
$location = "page-new.php?saved=true";
$location = "page-new.php?saved=$post_ID";
if ( isset($_POST['save']) )
$location = "post.php?action=edit&post=$post_ID";
@ -346,7 +346,7 @@ default:
require_once ('./admin-header.php');
?>
<?php if ( isset($_GET['posted']) ) : ?>
<div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div>
<div id="message" class="updated fade"><p><strong><?php _e('Post saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?> &raquo;</a></p></div>
<?php endif; ?>
<?php
if ( current_user_can('edit_posts') ) {