Make WordPress Core

Ticket #2302: 2302.diff

File 2302.diff, 1.2 KB (added by davidhouse, 19 years ago)
  • wp-admin/edit-form-advanced.php

     
    218218<?php do_action('edit_form_advanced'); ?>
    219219
    220220<?php
    221 $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID);
    222 $uploading_iframe_src = "inline-uploading.php?action=view&amp;post=$uploading_iframe_ID";
    223 $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src);
    224 if ( false != $uploading_iframe_src )
    225         echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
     221if (current_user_can('upload_files')) {
     222        $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID);
     223        $uploading_iframe_src = "inline-uploading.php?action=view&amp;post=$uploading_iframe_ID";
     224        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src);
     225        if ( false != $uploading_iframe_src )
     226                echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>';
     227}
    226228?>
    227229
    228230<div id="advancedstuff" class="dbx-group" >