Changeset 8691 for trunk/wp-admin/post.php
- Timestamp:
- 08/20/2008 09:42:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r8656 r8691 36 36 } elseif ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) { 37 37 $location = 'sidebar.php?a=b'; 38 } elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {38 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { 39 39 if ( $_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 ) 40 40 $location = add_query_arg( array( … … 43 43 ), get_edit_post_link( $post_ID, 'url' ) ); 44 44 else 45 $location = add_query_arg( 'message', 4, get_edit_post_link( $post_ID, 'url' ) );45 $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) ); 46 46 } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) { 47 47 $location = add_query_arg( 'message', 2, wp_get_referer() ); … … 63 63 } elseif ($action == 'editattachment') { 64 64 $location = 'attachments.php'; 65 } elseif ( 'post-quickpress-save-cont' == $_POST['action'] ) { 66 $location = "post.php?action=edit&post=$post_ID&message=7"; 65 67 } else { 66 68 $location = add_query_arg( 'message', 4, get_edit_post_link( $post_ID, 'url' ) ); … … 76 78 case 'postajaxpost': 77 79 case 'post': 80 case 'post-quickpress-publish': 81 case 'post-quickpress-save': 82 case 'post-quickpress-save-cont': 78 83 check_admin_referer('add-post'); 79 84 80 $post_ID = 'post' == $action ? write_post() : edit_post(); 85 if ( 'post-quickpress-publish' == $action ) 86 $_POST['publish'] = 'publish'; // tell write_post() to publish 87 88 if ( !empty( $_POST['quickpress_post_ID'] ) ) { 89 $_POST['post_ID'] = (int) $_POST['quickpress_post_ID']; 90 $post_ID = edit_post(); 91 } else { 92 $post_ID = 'postajaxpost' == $action ? edit_post() : write_post(); 93 } 94 95 if ( 'post-quickpress-save-cont' != $action && 0 === strpos( $action, 'post-quickpress' ) ) { 96 $_POST['post_ID'] = $post_ID; 97 // output the quickpress dashboard widget 98 require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); 99 add_filter( 'wp_dashboard_widgets', create_function( '$a', 'return array( "dashboard_quick_press" );' ) ); 100 wp_dashboard_setup(); 101 wp_dashboard(); 102 exit; 103 } 81 104 82 105 redirect_post($post_ID);
Note: See TracChangeset
for help on using the changeset viewer.