Ticket #21179: 21179.patch
File 21179.patch, 1.1 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/media.php
1326 1326 1327 1327 ?></div> 1328 1328 <?php 1329 // Check quota for this blog if multisite1330 if ( is_multisite() && !is_upload_space_available() ) {1331 echo '<p>' . sprintf( __( 'Sorry, you have filled your storage quota (%s MB).' ), get_space_allowed() ) . '</p>';1332 return;1333 }1334 1329 1335 1330 do_action('pre-upload-ui'); 1331 if ( true === apply_filters( 'suppress-upload-ui', false ) ) 1332 return; 1336 1333 1337 1334 $post_params = array( 1338 1335 "post_id" => $post_id, … … 2065 2062 } 2066 2063 add_action('post-plupload-upload-ui', 'media_upload_flash_bypass'); 2067 2064 2065 function multisite_quota_check() { 2066 // Check quota for this blog if multisite 2067 if ( is_multisite() && !is_upload_space_available() ) { 2068 add_filter( 'suppress-upload-ui', '__return_true' ); 2069 echo '<p>' . sprintf( __( 'Sorry, you have filled your storage quota (%s MB).' ), get_space_allowed() ) . '</p>'; 2070 } 2071 } 2072 add_action( 'pre-upload-ui', 'multisite_quota_check', 9 ); 2073 2068 2074 /** 2069 2075 * {@internal Missing Short Description}} 2070 2076 *