Show
Ignore:
Timestamp:
06/23/08 23:27:07 (5 months ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.5/wp-admin/includes/template.php

    r7801 r8178  
    824824<tr class="submit"><td colspan="3"> 
    825825    <?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?> 
    826     <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' ) ?>" /> 
     826    <input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" /> 
    827827</td></tr> 
    828828</table> 
  • branches/2.5/wp-admin/js/post.js

    r7778 r8178  
    178178            autosave_update_post_ID(s.parsed.responses[0].supplemental.postid); 
    179179        } 
    180     } }); 
     180    }, addBefore: function( s ) { 
     181        s.data += '&post_id=' + jQuery('#post_ID').val(); 
     182        return s; 
     183    } 
     184    }); 
    181185});