wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
upload_is_user_over_quota › WordPress Function
Seit
Veraltetn/v
› upload_is_user_over_quota ( $display_message = true )
Parameter: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: | |
Changelog: |
|
Checks whether a site has used its allotted upload space.
Ähnliche Funktionen: multisite_over_quota_message, update_user_meta, wp_send_user_request, add_user_meta, wp_fix_server_vars
Quellcode
function upload_is_user_over_quota( $display_message = true ) { if ( get_site_option( 'upload_space_check_disabled' ) ) { return false; } $space_allowed = get_space_allowed(); if ( ! is_numeric( $space_allowed ) ) { $space_allowed = 10; // Default space allowed is 10 MB. } $space_used = get_space_used(); if ( ( $space_allowed - $space_used ) < 0 ) { if ( $display_message ) { printf( /* translators: %s: Allowed space allocation. */ __( 'Sorry, you have used your space allocation of %s. Please delete some files to upload more files.' ), size_format( $space_allowed * MB_IN_BYTES ) ); } return true; } else { return false; } }