WordPress.org

Make WordPress Core

Ticket #12914: 12914.diff

File 12914.diff, 1.4 KB (added by nacin, 3 years ago)
  • wp-admin/includes/dashboard.php

     
    386386                $edit = esc_url( get_edit_post_link( $_POST['post_ID'] ) ); 
    387387                if ( 'post-quickpress-publish' == $_POST['action'] ) { 
    388388                        if ( current_user_can('publish_posts') ) 
    389                                 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 ); 
     389                                printf( '<div class="message" id="quickpress-post-published"><p>' . __( 'Post Published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', esc_url( $view ), $edit ); 
    390390                        else 
    391391                                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 ); 
    392392                } else { 
  • wp-admin/js/dashboard.dev.js

     
    6363                } ); 
    6464 
    6565                $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 
     66                if ( $('#quickpress-post-published').length ) { 
     67                        p = $('#dashboard_right_now .table_content:first td.b-posts a'); 
     68                        p.text( parseInt(p.text()) + 1 ); 
     69                } 
    6670 
    6771        }; 
    6872        quickPressLoad();