Changeset 33836
- Timestamp:
- 08/31/2015 11:07:36 PM (9 years ago)
- Location:
- trunk/src/wp-admin/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/post.js
r33468 r33836 930 930 } 931 931 }); 932 933 if ( $( '#original_post_status' ).val() === 'auto-draft' && window.history.replaceState ) { 934 var location; 935 936 $( '#publish' ).on( 'click', function() { 937 location = window.location.href; 938 location += ( location.indexOf( '?' ) !== -1 ) ? '&' : '?'; 939 location += 'wp-post-new-reload=true'; 940 941 window.history.replaceState( null, null, location ); 942 }); 943 } 932 944 }); 933 945 -
trunk/src/wp-admin/js/press-this.js
r32999 r33836 774 774 // Publish, Draft and Preview buttons 775 775 $( '.post-actions' ).on( 'click.press-this', function( event ) { 776 var $target = $( event.target ), 776 var location, 777 $target = $( event.target ), 777 778 $button = $target.closest( 'button' ); 778 779 … … 783 784 } else if ( $button.hasClass( 'publish-button' ) ) { 784 785 $button.addClass( 'is-saving' ); 786 787 if ( window.history.replaceState ) { 788 location = window.location.href; 789 location += ( location.indexOf( '?' ) !== -1 ) ? '&' : '?'; 790 location += 'wp-press-this-reload=true'; 791 792 window.history.replaceState( null, null, location ); 793 } 794 785 795 submitPost( 'publish' ); 786 796 } else if ( $button.hasClass( 'preview-button' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.