Image uploading for pages. Props skeltoac. fixes #1759

git-svn-id: https://develop.svn.wordpress.org/trunk@2951 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-10-14 21:52:56 +00:00
parent 565ff7ca40
commit 976678dce3
1 changed files with 8 additions and 2 deletions

View File

@ -4,7 +4,8 @@
<?php
if (0 == $post_ID) {
$form_action = 'post';
$form_extra = '';
$temp_ID = -1 * time();
$form_extra = "<input type='hidden' name='temp_ID' value='$temp_ID' />";
} else {
$form_action = 'editpost';
$form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
@ -145,6 +146,11 @@ edCanvas = document.getElementById('content');
<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
</p>
<?php
$frame_src = 'image-uploading.php?action=view&amp;post=' . ((0 == $post_ID) ? $temp_ID : $post_ID);
$frame_src = apply_filters('upload_frame_src', $frame_src, ((0 == $post_ID) ? $temp_ID : $post_ID));
?>
<iframe border="0" src="<?php echo $frame_src; ?>" id="imageup"><?php _e('This feature requires iframe support.'); ?></iframe>
<div id="advancedstuff" class="dbx-group">
@ -175,4 +181,4 @@ if($metadata = has_meta($post_ID)) {
</div>
</div>
</div>