Respect post_ID update when doing multiple add meta AJAX requests. Props mdawaffe. fixes #7170 see #6457
git-svn-id: http://svn.automattic.com/wordpress/trunk@8177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4f77631dd4
commit
316e26ee39
|
@ -915,7 +915,7 @@ function meta_form() {
|
|||
</tr>
|
||||
<tr class="submit"><td colspan="3">
|
||||
<?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?>
|
||||
<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' ) ?>" />
|
||||
<input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" />
|
||||
</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
|
|
|
@ -181,5 +181,9 @@ jQuery(document).ready( function() {
|
|||
if ( jQuery.isFunction( autosave_update_post_ID ) ) {
|
||||
autosave_update_post_ID(s.parsed.responses[0].supplemental.postid);
|
||||
}
|
||||
} });
|
||||
}, addBefore: function( s ) {
|
||||
s.data += '&post_id=' + jQuery('#post_ID').val();
|
||||
return s;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -136,7 +136,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'save' => __('Save'),
|
||||
'cancel' => __('Cancel'),
|
||||
) );
|
||||
$scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080519' );
|
||||
$scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080623' );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
'tagsUsed' => __('Tags used on this post:'),
|
||||
'add' => attribute_escape(__('Add')),
|
||||
|
|
Loading…
Reference in New Issue