Ticket #10917: 10917.patch
File 10917.patch, 3.2 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/dashboard.php
384 384 } 385 385 386 386 function wp_dashboard_quick_press() { 387 global $post_ID; 388 387 389 $drafts = false; 388 390 if ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) && isset( $_POST['action'] ) && 0 === strpos( $_POST['action'], 'post-quickpress' ) && (int) $_POST['post_ID'] ) { 389 391 $view = get_permalink( $_POST['post_ID'] ); 390 392 $edit = esc_url( get_edit_post_link( $_POST['post_ID'] ) ); 391 393 if ( 'post-quickpress-publish' == $_POST['action'] ) { 392 394 if ( current_user_can('publish_posts') ) 393 printf( '<div class=" message"><p>' . __( 'Post Published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( $view ), $edit );395 printf( '<div class="updated"><p>' . __( 'Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( $view ), $edit ); 394 396 else 395 printf( '<div class=" message"><p>' . __( 'Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit );397 printf( '<div class="updated"><p>' . __( 'Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit ); 396 398 } else { 397 printf( '<div class=" message"><p>' . __( 'Draft Saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit );399 printf( '<div class="updated"><p>' . __( 'Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( add_query_arg( 'preview', 1, $view ) ), $edit ); 398 400 $drafts_query = new WP_Query( array( 399 401 'post_type' => 'post', 400 402 'post_status' => 'draft', … … 407 409 if ( $drafts_query->posts ) 408 410 $drafts =& $drafts_query->posts; 409 411 } 410 printf('<p class="textright">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href=" tools.php">' . __('Press This') . '</a>' );412 printf('<p class="textright">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url( admin_url( 'tools.php' ) ) . '">' . __('Press This') . '</a>' ); 411 413 $_REQUEST = array(); // hack for get_default_post_to_edit() 412 414 } 413 415 414 $post = get_default_post_to_edit(); 416 $post = get_default_post_to_edit('post', true); 417 $post_ID = (int) $post->ID; 415 418 ?> 416 419 417 420 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press"> … … 440 443 441 444 <p class="submit"> 442 445 <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> 443 <input type="hidden" name="quickpress_post_ID" value="<?php echo (int) $post->ID; ?>" />446 <input type="hidden" name="quickpress_post_ID" value="<?php echo $post_ID; ?>" /> 444 447 <input type="hidden" name="post_type" value="post" /> 445 448 <?php wp_nonce_field('add-post'); ?> 446 449 <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />