wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
get_upload_space_available › WordPress Function
Depuis3.0.0
Dépréciéen/a
› get_upload_space_available ( Pas de paramètres )
| Retourne: |
|
| Défini(e) dans: |
|
| Codex: |
Determines if there is any upload space left in the current blog's quota.
Fonctions en relation: is_upload_space_available, get_theme_update_available, theme_update_available, get_space_allowed, get_admin_page_title
Source
function get_upload_space_available() {
$allowed = get_space_allowed();
if ( $allowed < 0 ) {
$allowed = 0;
}
$space_allowed = $allowed * MB_IN_BYTES;
if ( get_site_option( 'upload_space_check_disabled' ) ) {
return $space_allowed;
}
$space_used = get_space_used() * MB_IN_BYTES;
if ( ( $space_allowed - $space_used ) <= 0 ) {
return 0;
}
return $space_allowed - $space_used;
}