Make WordPress Core


Ignore:
Timestamp:
04/08/2015 11:13:35 PM (11 years ago)
Author:
azaozz
Message:

Press This:

  • When saving a draft change the text of the Save Draft button to Saving...
  • On success, hide the button and show Edit Post link in its place. If the user focuses the title or the editor, hide the link and show the button again.

Fixes #31923.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r32014 r32092  
    14311431        <div class="post-actions">
    14321432            <span class="spinner">&nbsp;</span>
    1433             <button type="button" class="button-subtle draft-button"><?php _e( 'Save Draft' ); ?></button>
     1433            <button type="button" class="button-subtle draft-button" aria-live="polite">
     1434                <span class="save-draft"><?php _e( 'Save Draft' ); ?></span>
     1435                <span class="saving-draft"><?php _e( 'Saving...' ); ?></span>
     1436            </button>
     1437            <a href="<?php echo esc_url( get_edit_post_link( $post_ID ) ); ?>" class="edit-post-link" style="display: none;" target="_blank"><?php _e( 'Edit Post' ); ?></a>
    14341438            <button type="button" class="button-subtle preview-button"><?php _e( 'Preview' ); ?></button>
    14351439            <button type="button" class="button-primary publish-button"><?php echo ( current_user_can( 'publish_posts' ) ) ? __( 'Publish' ) : __( 'Submit for Review' ); ?></button>
Note: See TracChangeset for help on using the changeset viewer.