Make WordPress Core

Ticket #7170: 7170.diff

File 7170.diff, 1.2 KB (added by mdawaffe, 17 years ago)
  • wp-admin/includes/template.php

     
    915915        </tr>
    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>
    921921<?php
  • wp-admin/js/post.js

     
    181181                if ( jQuery.isFunction( autosave_update_post_ID ) ) {
    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});