Changeset 11159
- Timestamp:
- 05/02/2009 09:44:09 PM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r11152 r11159 17 17 if ( isset($_GET['message']) ) 18 18 $_GET['message'] = absint( $_GET['message'] ); 19 $messages[1] = sprintf( __( 'Post updated. Continue editing below or <a href="%s">go back</a>.' ), attr( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ));19 $messages[1] = sprintf(__('Post updated. <a href="%s">View post</a>'), get_permalink($post_ID)); 20 20 $messages[2] = __('Custom field updated.'); 21 21 $messages[3] = __('Custom field deleted.'); -
trunk/wp-admin/edit-page-form.php
r11149 r11159 19 19 if ( isset($_GET['message']) ) 20 20 $_GET['message'] = absint( $_GET['message'] ); 21 $messages[1] = sprintf( __( 'Page updated. Continue editing below or <a href="%s">go back</a>.' ), attr( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ));21 $messages[1] = sprintf(__('Page updated. <a href="%s">View page</a>'), get_permalink($post_ID)); 22 22 $messages[2] = __('Custom field updated.'); 23 23 $messages[3] = __('Custom field deleted.'); 24 $messages[4] = sprintf(__('Page updated. <a href="%s">View page</a>'), get_permalink($post_ID));25 24 $messages[5] = sprintf(__('Page published. <a href="%s">View page</a>'), get_permalink($post_ID)); 26 25 $messages[6] = sprintf(__('Page submitted. <a href="%s">Preview page</a>'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); -
trunk/wp-admin/page.php
r10094 r11159 36 36 } elseif ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) { 37 37 $location = 'sidebar.php?a=b'; 38 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { 39 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 ) 40 $location = add_query_arg( array( 41 '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), 42 'message' => 1 43 ), get_edit_post_link( $page_ID, 'url' ) ); 44 else { 45 if ( isset( $_POST['publish'] ) ) { 46 if ( 'pending' == get_post_status( $page_ID ) ) 47 $location = add_query_arg( 'message', 6, get_edit_post_link( $page_ID, 'url' ) ); 48 else 49 $location = add_query_arg( 'message', 5, get_edit_post_link( $page_ID, 'url' ) ); 50 } else { 51 $location = add_query_arg( 'message', 4, get_edit_post_link( $page_ID, 'url' ) ); 52 } 38 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) ) { 39 if ( isset( $_POST['publish'] ) ) { 40 if ( 'pending' == get_post_status( $page_ID ) ) 41 $location = add_query_arg( 'message', 6, get_edit_post_link( $page_ID, 'url' ) ); 42 else 43 $location = add_query_arg( 'message', 5, get_edit_post_link( $page_ID, 'url' ) ); 44 } else { 45 $location = add_query_arg( 'message', 1, get_edit_post_link( $page_ID, 'url' ) ); 53 46 } 54 47 } elseif ( isset($_POST['addmeta']) ) { … … 60 53 $location = explode('#', $location); 61 54 $location = $location[0] . '#postcustom'; 62 } elseif (!empty($referredby) && $referredby != $referer) {63 $location = $_POST['referredby'];64 $location = remove_query_arg('_wp_original_http_referer', $location);65 if ( false !== strpos($location, 'edit-pages.php') )66 $location = add_query_arg('posted', $page_ID, $location);67 elseif ( false !== strpos($location, 'wp-admin') )68 $location = "page-new.php?posted=$page_ID";69 } elseif ( isset($_POST['publish']) ) {70 $location = "page-new.php?posted=$page_ID";71 55 } elseif ($action == 'editattachment') { 72 56 $location = 'attachments.php'; 73 57 } else { 74 $location = add_query_arg( 'message', 4, get_edit_post_link( $page_ID, 'url' ) );58 $location = add_query_arg( 'message', 1, get_edit_post_link( $page_ID, 'url' ) ); 75 59 } 76 60 -
trunk/wp-admin/post.php
r10094 r11159 39 39 elseif ( isset($_POST['publish']) ) 40 40 $location = 'sidebar.php?a=b'; 41 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { 42 if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false ) 43 $location = add_query_arg( array( 44 '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), 45 'message' => 1 46 ), get_edit_post_link( $post_ID, 'url' ) ); 47 else { 48 if ( isset( $_POST['publish'] ) ) { 49 if ( 'pending' == get_post_status( $post_ID ) ) 50 $location = add_query_arg( 'message', 8, get_edit_post_link( $post_ID, 'url' ) ); 51 else 52 $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) ); 53 } else { 54 $location = add_query_arg( 'message', 7, get_edit_post_link( $post_ID, 'url' ) ); 55 } 41 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) ) { 42 if ( isset( $_POST['publish'] ) ) { 43 if ( 'pending' == get_post_status( $post_ID ) ) 44 $location = add_query_arg( 'message', 8, get_edit_post_link( $post_ID, 'url' ) ); 45 else 46 $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) ); 47 } else { 48 $location = add_query_arg( 'message', 1, get_edit_post_link( $post_ID, 'url' ) ); 56 49 } 57 50 } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) { … … 63 56 $location = explode('#', $location); 64 57 $location = $location[0] . '#postcustom'; 65 } elseif (!empty($referredby) && $referredby != $referer) {66 $location = $_POST['referredby'];67 $location = remove_query_arg('_wp_original_http_referer', $location);68 if ( false !== strpos($location, 'edit.php') || false !== strpos($location, 'edit-post-drafts.php') )69 $location = add_query_arg('posted', $post_ID, $location);70 elseif ( false !== strpos($location, 'wp-admin') )71 $location = "post-new.php?posted=$post_ID";72 } elseif ( isset($_POST['publish']) ) {73 $location = "post-new.php?posted=$post_ID";74 58 } elseif ($action == 'editattachment') { 75 59 $location = 'attachments.php';
Note: See TracChangeset
for help on using the changeset viewer.