mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 08:41:24 +01:00
Give feedback after publishing a page. fixes #8414
git-svn-id: http://svn.automattic.com/wordpress/trunk@9996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad1d687e24
commit
13ae14c6ee
@ -22,6 +22,7 @@ $messages[1] = sprintf( __( 'Page updated. Continue editing below or <a href="%s
|
||||
$messages[2] = __('Custom field updated.');
|
||||
$messages[3] = __('Custom field deleted.');
|
||||
$messages[4] = __('Page updated.');
|
||||
$messages[5] = sprintf(__('Page published. <a href="%s">View page</a>'), get_permalink($post_ID));
|
||||
|
||||
if ( isset($_GET['revision']) )
|
||||
$messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) );
|
||||
|
@ -35,14 +35,18 @@ function redirect_page($page_ID) {
|
||||
$location = $_POST['referredby'];
|
||||
} elseif ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
|
||||
$location = 'sidebar.php?a=b';
|
||||
} elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||
} elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||
if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page-new.php') === false )
|
||||
$location = add_query_arg( array(
|
||||
'_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ),
|
||||
'message' => 1
|
||||
), get_edit_post_link( $page_ID, 'url' ) );
|
||||
else {
|
||||
if ( isset( $_POST['publish'] ) )
|
||||
$location = add_query_arg( 'message', 5, get_edit_post_link( $page_ID, 'url' ) );
|
||||
else
|
||||
$location = add_query_arg( 'message', 4, get_edit_post_link( $page_ID, 'url' ) );
|
||||
}
|
||||
} elseif ( isset($_POST['addmeta']) ) {
|
||||
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
||||
$location = explode('#', $location);
|
||||
|
Loading…
Reference in New Issue
Block a user