Make WordPress Core

Changeset 8178


Ignore:
Timestamp:
06/23/2008 11:27:07 PM (17 years ago)
Author:
ryan
Message:

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

Location:
branches/2.5/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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});
Note: See TracChangeset for help on using the changeset viewer.