Changeset 8441

Show
Ignore:
Timestamp:
07/24/08 21:40:40 (1 month ago)
Author:
mdawaffe
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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 
  • branches/crazyhorse/wp-admin/upload.php

    r8295 r8441  
    8383    $h2_tag    = isset($_GET['tag']) && $_GET['tag'] ? ' ' . sprintf( __('tagged with &#8220;%s&#8221;'), single_tag_title('', false) ) : ''; 
    8484    $h2_month  = isset($_GET['m'])   && $_GET['m']   ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; 
    85     printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s" class="thickbox">Add New</a>)|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month, 'media-upload.php?TB_iframe=true' ); 
     85    printf( _c( '%1$s%2$s%3$s%4$s%5$s%6$s (<a href="%7$s" class="thickbox">Add New</a>)|You can reorder these: 1: Posts, 2: by {s}, 3: matching {s}, 4: in {s}, 5: tagged with {s}, 6: during {s}' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_tag, $h2_month, 'media-upload.php?library=false&TB_iframe=true' ); 
    8686} 
    8787?></h2>