upload_is_user_over_quota [ WordPress Function ]
upload_is_user_over_quota ( $echo = true )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: update_user_meta, add_user_meta, wp_fix_server_vars, is_server_error, update_usermeta
Check whether a blog has used its allotted upload space.
Source
<?php
function upload_is_user_over_quota( $echo = true ) {
if ( get_site_option( 'upload_space_check_disabled' ) )
return false;
$spaceAllowed = get_space_allowed();
if ( empty( $spaceAllowed ) || !is_numeric( $spaceAllowed ) )
$spaceAllowed = 10; // Default space allowed is 10 MB
$size = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;
if ( ($spaceAllowed-$size) < 0 ) {
if ( $echo )
_e( 'Sorry, you have used your space allocation. Please delete some files to upload more files.' ); // No space left
return true;
} else {
return false;
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- (upload_space_check_disabled in upload_is_user_over_quota())
upload_space_check_disabled in upload_is_user_over_quota() ... function upload_is_user_over_quota( $echo = true ) { if ( get_site_option( ...
core.trac.wordpress.org - [Plugin: NextGEN Gallery] Flash uploader not working - WordPress
if ( (is_multisite()) && wpmu_enable_function('wpmuQuotaCheck')) if( $error = upload_is_user_over_quota( false ) ) { nggGallery::show_error( __( 'Sorry, you ...
wordpress.org - <?php // A set of unit tests for WordPress MultiSite /* To get the test ...
... Tests the following functions: * upload_is_user_over_quota * is_upload_space_available * get_space_allowed */ function test_upload_is_user_over_quota() ...
gsoc.svn.wordpress.org - ms-functions.php - PHP Cross Reference of WordPress Source - Yoast
Jun 1, 2011 ... get_most_recent_post_of_user() get_dirsize() recurse_dirsize() upload_is_user_over_quota() check_upload_mimes() update_posts_count() ...
xref.yoast.com