Don't hard code post type in edit forms. Props filosofo and DD32. fixes #4991

git-svn-id: http://svn.automattic.com/wordpress/trunk@6712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-02-02 19:22:14 +00:00
parent 8263948a96
commit d42b1a8256
5 changed files with 17 additions and 8 deletions

View File

@@ -27,15 +27,14 @@ if ( 0 != $post_ID && $sendto == get_permalink($post_ID) )
<?php
wp_nonce_field($nonce_action);
if (isset($mode) && 'bookmarklet' == $mode) {
if (isset($mode) && 'bookmarklet' == $mode)
echo '<input type="hidden" name="mode" value="bookmarklet" />';
}
?>
<input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' />
<input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />
<?php echo $form_extra ?>
<input type="hidden" id="post_type" name="post_type" value="page" />
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
<script type="text/javascript">
// <![CDATA[