Make WordPress Core

Changeset 8177


Ignore:
Timestamp:
06/23/2008 11:25:15 PM (16 years ago)
Author:
ryan
Message:

Respect post_ID update when doing multiple add meta AJAX requests. Props mdawaffe. fixes #7170 see #6457

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r8089 r8177  
    916916<tr class="submit"><td colspan="3">
    917917    <?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?>
    918     <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta::post_id=<?php echo $GLOBALS['post_ID'] ? $GLOBALS['post_ID'] : $GLOBALS['temp_ID']; ?>" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" />
     918    <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" />
    919919</td></tr>
    920920</table>
  • trunk/wp-admin/js/post.js

    r7956 r8177  
    182182            autosave_update_post_ID(s.parsed.responses[0].supplemental.postid);
    183183        }
    184     } });
     184    }, addBefore: function( s ) {
     185        s.data += '&post_id=' + jQuery('#post_ID').val();
     186        return s;
     187    }
     188    });
    185189});
  • trunk/wp-includes/script-loader.php

    r8170 r8177  
    137137            'cancel' => __('Cancel'),
    138138        ) );
    139         $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080519' );
     139        $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080623' );
    140140        $scripts->localize( 'post', 'postL10n', array(
    141141            'tagsUsed' =>  __('Tags used on this post:'),
Note: See TracChangeset for help on using the changeset viewer.