Make WordPress Core

Changeset 6834


Ignore:
Timestamp:
02/14/2008 12:51:28 AM (16 years ago)
Author:
ryan
Message:

Save tags lingering in quick add box upon save. Props fitzrev. fixes #5849

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r6829 r6834  
    147147
    148148<p class="submit">
    149 <input type="submit" name="save" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
     149<input type="submit" name="save" id="save-post" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
    150150<?php
    151151if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
  • trunk/wp-admin/js/post.js

    r6770 r6834  
    4646}
    4747
     48function tag_save_on_publish() {
     49    if ( jQuery('#newtag').val() != postL10n.addTag )
     50        tag_flush_to_text();
     51}
     52
    4853function tag_press_key( e ) {
    4954    if ( 13 == e.keyCode ) {
     
    7883            jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' );
    7984    });
     85
     86    // auto-save tags on post save/publish
     87    jQuery('#publish').click( tag_save_on_publish );
     88    jQuery('#save-post').click( tag_save_on_publish );
    8089
    8190    // auto-suggest stuff
Note: See TracChangeset for help on using the changeset viewer.