mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Update post save notifications and redirects
git-svn-id: http://svn.automattic.com/wordpress/trunk@6807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
38ecbf2f7f
commit
8d1af802b2
@ -16,13 +16,6 @@ if ( !isset( $_GET['paged'] ) )
|
||||
$_GET['paged'] = 1;
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<form id="posts-filter" action="" method="get">
|
||||
@ -79,6 +72,13 @@ unset($status_links);
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<div id="message" class="updated fade"><strong><p><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<p id="post-search">
|
||||
<input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
|
||||
<input type="submit" value="<?php _e( 'Search Posts' ); ?>" />
|
||||
|
@ -24,7 +24,7 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||
}
|
||||
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<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 »'); ?></a></p></div>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $_GET['posted']; ?>"><?php _e('Edit post'); ?></a></p></div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
@ -126,9 +126,7 @@ case 'editpost':
|
||||
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
|
||||
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
||||
|
||||
if ($_POST['save']) {
|
||||
$location = "post.php?action=edit&post=$post_ID";
|
||||
} elseif ($_POST['addemeta']) {
|
||||
if ($_POST['addemeta']) {
|
||||
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
||||
$location = explode('#', $location);
|
||||
$location = $location[0] . '#postcustom';
|
||||
@ -140,10 +138,12 @@ case 'editpost':
|
||||
$location = $_POST['referredby'];
|
||||
if ( $_POST['referredby'] == 'redo' )
|
||||
$location = get_permalink( $post_ID );
|
||||
if (false !== strpos($location, 'edit.php') )
|
||||
$location = add_query_arg('posted', $post_ID, $location);
|
||||
} elseif ($action == 'editattachment') {
|
||||
$location = 'attachments.php';
|
||||
} else {
|
||||
$location = 'edit.php?posted=' . $post_ID;
|
||||
$location = "post.php?action=edit&post=$post_ID";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user