wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
get_space_used › WordPress Function
Od3.5.0
Przestarzałyn/a
› get_space_used ( Brak parametrów )
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Returns the space used by the current site.
Powiązane Funkcje: get_space_allowed, get_page_statuses, get_pages, get_page_uri, get_current_user_id
Źródło
function get_space_used() {
/**
* Filters the amount of storage space used by the current site, in megabytes.
*
* @since 3.5.0
*
* @param int|false $space_used The amount of used space, in megabytes. Default false.
*/
$space_used = apply_filters( 'pre_get_space_used', false );
if ( false === $space_used ) {
$upload_dir = wp_upload_dir();
$space_used = get_dirsize( $upload_dir['basedir'] ) / MB_IN_BYTES;
}
return $space_used;
}