Multisite: Make it easy to replace or augment the over-quota message displayed when you try and upload new media and you have reached your quota.

Fixes #21179 props dllh, jkudish. 


git-svn-id: https://develop.svn.wordpress.org/trunk@21256 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2012-07-10 13:33:44 +00:00
parent 95aac8c091
commit cebf4e277b
2 changed files with 6 additions and 2 deletions

View File

@ -1326,9 +1326,8 @@ function media_upload_form( $errors = null ) {
?></div>
<?php
// Check quota for this blog if multisite
if ( is_multisite() && !is_upload_space_available() ) {
echo '<p>' . sprintf( __( 'Sorry, you have filled your storage quota (%s MB).' ), get_space_allowed() ) . '</p>';
do_action( 'upload_ui_over_quota' );
return;
}
@ -2065,6 +2064,10 @@ function media_upload_flash_bypass() {
}
add_action('post-plupload-upload-ui', 'media_upload_flash_bypass');
function multisite_over_quota_message() {
echo '<p>' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '</p>';
}
/**
* {@internal Missing Short Description}}
*

View File

@ -45,6 +45,7 @@ add_filter( 'wp_upload_bits', 'upload_is_file_too_big' );
add_filter( 'import_upload_size_limit', 'fix_import_form_size' );
add_filter( 'upload_mimes', 'check_upload_mimes' );
add_filter( 'upload_size_limit', 'upload_size_limit_filter' );
add_action( 'upload_ui_over_quota', 'multisite_over_quota_message' );
// Mail
add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );