Make WordPress Core


Ignore:
Timestamp:
07/24/2008 09:40:40 PM (17 years ago)
Author:
mdawaffe
Message:

crazyhorse: don't show 'or select from media library' when uploading directly to the media library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/includes/media.php

    r8422 r8441  
    339339    }
    340340
    341     return wp_iframe( 'media_edit_single_form', $id );
     341    return wp_iframe( 'media_edit_single_form', $id, $errors );
    342342}
    343343
     
    724724
    725725// crazyhorse
    726 function media_edit_single_form($attachment_id = 0) {
     726function media_edit_single_form($attachment_id = 0, $errors = null) {
    727727    global $redir_tab;
    728728
     
    744744
    745745    media_upload_header();
     746
     747    if ( $errors ) :
     748?>
     749
     750<div id="media-upload-notice">
     751<?php if (isset($errors['upload_notice']) ) { ?>
     752    <?php echo $errors['upload_notice']; ?>
     753<?php } ?>
     754</div>
     755<div id="media-upload-error">
     756<?php if (isset($errors['upload_error']) && is_wp_error($errors['upload_error'])) { ?>
     757    <?php echo $errors['upload_error']->get_error_message(); ?>
     758<?php } ?>
     759</div>
     760
     761<?php
     762    return;
     763    endif; // errors
    746764?>
    747765
     
    13261344</div>
    13271345
     1346<?php if ( 'false' !== $_GET['library'] ) : ?>
     1347
    13281348<div id="html-upload-help"><?php _e('Or select from your Media Library'); ?></div>
    13291349
     
    13521372</form>
    13531373<?php
     1374
     1375endif; // library
    13541376}
    13551377
Note: See TracChangeset for help on using the changeset viewer.