Ticket #18764: 18764.diff

File 18764.diff, 1.9 KB (added by scottbasgaard, 18 months ago)

Hooked into 'post-upload-ui' as advised by @nacin.

  • wp-admin/includes/media.php

     
    13781378<?php do_action('post-html-upload-ui'); ?> 
    13791379</div> 
    13801380 
    1381 <p><?php printf( __( 'Maximum upload file size: %d%s.' ), esc_html($upload_size_unit), esc_html($sizes[$u]) ); 
    1382 if ( ($is_IE || $is_opera) && $max_upload_size > 100 * 1024 * 1024 ) 
    1383                 echo ' <span class="big-file-warning">' . __('Your browser has some limitations uploading large files with the multi-file uploader. Please use the browser uploader for files over 100MB.') . '</span></p><p>'; 
    1384  
    1385 echo ' ' . __('After a file has been uploaded, you can add titles and descriptions.'); 
    1386 ?></p> 
    1387  
    13881381<?php 
    1389         do_action('post-upload-ui'); 
     1382        do_action('post-upload-ui', $max_upload_size, $upload_size_unit, $sizes, $u); 
    13901383} 
    13911384 
    13921385/** 
     
    20542047add_action('post-plupload-upload-ui', 'media_upload_flash_bypass'); 
    20552048add_action('post-html-upload-ui', 'media_upload_html_bypass'); 
    20562049 
     2050/**  
     2051* Display maximum upload file size  
     2052*  
     2053* @since 3.3  
     2054*/  
     2055function media_upload_max_file_size_message($max_upload_size, $upload_size_unit, $sizes, $u) { 
     2056        global $is_IE, $is_opera; 
     2057        ?>  
     2058        <p><?php printf( __( 'Maximum upload file size: %d%s.' ), esc_html($upload_size_unit), esc_html($sizes[$u]) );  
     2059        if ( ($is_IE || $is_opera) && $max_upload_size > 100 * 1024 * 1024 )  
     2060                echo ' <span class="big-file-warning">' . __('Your browser has some limitations uploading large files with the multi-file uploader. Please use the browser uploader for files over 100MB.') . '</span></p><p>';  
     2061        echo ' ' . apply_filters('media_upload_title_and_description_message', __('After a file has been uploaded, you can add titles and descriptions.')); ?>  
     2062        </p>  
     2063        <?php 
     2064}  
     2065add_action('post-upload-ui', 'media_upload_max_file_size_message', 10, 4); 
     2066 
    20572067/** 
    20582068 * {@internal Missing Short Description}} 
    20592069 *