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:
parent
95aac8c091
commit
cebf4e277b
@ -1326,9 +1326,8 @@ function media_upload_form( $errors = null ) {
|
|||||||
|
|
||||||
?></div>
|
?></div>
|
||||||
<?php
|
<?php
|
||||||
// Check quota for this blog if multisite
|
|
||||||
if ( is_multisite() && !is_upload_space_available() ) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2065,6 +2064,10 @@ function media_upload_flash_bypass() {
|
|||||||
}
|
}
|
||||||
add_action('post-plupload-upload-ui', '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}}
|
* {@internal Missing Short Description}}
|
||||||
*
|
*
|
||||||
|
@ -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( 'import_upload_size_limit', 'fix_import_form_size' );
|
||||||
add_filter( 'upload_mimes', 'check_upload_mimes' );
|
add_filter( 'upload_mimes', 'check_upload_mimes' );
|
||||||
add_filter( 'upload_size_limit', 'upload_size_limit_filter' );
|
add_filter( 'upload_size_limit', 'upload_size_limit_filter' );
|
||||||
|
add_action( 'upload_ui_over_quota', 'multisite_over_quota_message' );
|
||||||
|
|
||||||
// Mail
|
// Mail
|
||||||
add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );
|
add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );
|
||||||
|
Loading…
Reference in New Issue
Block a user