diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 210d398df9..bffeea5393 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -146,7 +146,7 @@ if ( 'future' == $post->post_status ) {
- + post_status, array('publish', 'future') ) || 0 == $post_ID ) { ?> diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 6e0cbe3602..d819f62c6b 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -45,6 +45,11 @@ function tag_flush_to_text() { return false; } +function tag_save_on_publish() { + if ( jQuery('#newtag').val() != postL10n.addTag ) + tag_flush_to_text(); +} + function tag_press_key( e ) { if ( 13 == e.keyCode ) { tag_flush_to_text(); @@ -78,6 +83,10 @@ addLoadEvent( function() { jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' ); }); + // auto-save tags on post save/publish + jQuery('#publish').click( tag_save_on_publish ); + jQuery('#save-post').click( tag_save_on_publish ); + // auto-suggest stuff jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2 } ); jQuery('#newtag').keypress( tag_press_key );