mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Respect post_ID update when doing multiple add meta AJAX requests. Props mdawaffe. fixes #7170 see #6457 for 2.5
git-svn-id: http://svn.automattic.com/wordpress/branches/2.5@8178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9540ab9d33
commit
cffdcdb09c
@ -823,7 +823,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
|
||||
|
@ -177,5 +177,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;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user