Make WordPress Core


Ignore:
Timestamp:
03/05/2008 06:46:42 AM (18 years ago)
Author:
ryan
Message:

Improve upload_max_filesize error. Improve error display for long messages. New uploads now added to bottom, not top. Fix align class. Remove redundant header text. Props andy. see #5911

File:
1 edited

Legend:

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

    r7151 r7160  
    271271        if ( isset($_POST['insertonly']['align']) ) {
    272272            $align = attribute_escape($_POST['insertonly']['align']);
    273             $class = " class='align-$align'";
     273            $class = " class='align$align'";
    274274        }
    275275        $html = "<img src='$src' alt='$alt'$class />";
     
    603603    foreach ( $attachments as $id => $attachment )
    604604        if ( $item = get_media_item($id, isset($errors[$id]) ? $errors[$id] : null) )
    605             $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div><span class='filename'></span><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>";
     605            $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div><div class='filename'></div><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>";
    606606
    607607    return $output;
     
    646646    <a class='toggle describe-toggle-on' href='#'>$toggle_on</a>
    647647    <a class='toggle describe-toggle-off' href='#'>$toggle_off</a>
    648     <span class='filename new'>$filename</span>
     648    <div class='filename new'>$filename</div>
    649649    <table class='slidetoggle describe $class'><tbody>
    650650        <tr>
     
    731731}
    732732
    733 function media_upload_header($title = false) {
    734     if ( empty($title) )
    735         $title = __('Choose a File');
     733function media_upload_header() {
    736734    ?>
    737735    <script type="text/javascript">post_id = <?php echo intval($_REQUEST['post_id']); ?>;</script>
    738736    <div id="media-upload-header">
    739     <h3><?php echo $title ?></h3>
    740737    <?php the_media_upload_tabs(); ?>
    741738    </div>
     
    857854
    858855function media_upload_gallery_form($errors) {
    859     media_upload_header(__('Browse attached files'));
     856    media_upload_header();
    860857
    861858    $post_id = intval($_REQUEST['post_id']);
     
    895892    global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
    896893
    897     media_upload_header(__('Browse Media Library'));
     894    media_upload_header();
    898895
    899896    $post_id = intval($_REQUEST['post_id']);
Note: See TracChangeset for help on using the changeset viewer.