wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
get_dirsize › WordPress Function
Odn/a
Przestarzałyn/a
› get_dirsize ( $directory, $max_execution_time = null )
| Parametry: (2) |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: | |
| Dziennik zmian: |
|
Gets the size of a directory.
A helper function that is used primarily to check whether a blog has exceeded its allowed upload space.Źródło
function get_dirsize( $directory, $max_execution_time = null ) {
/*
* Exclude individual site directories from the total when checking the main site of a network,
* as they are subdirectories and should not be counted.
*/
if ( is_multisite() && is_main_site() ) {
$size = recurse_dirsize( $directory, $directory . '/sites', $max_execution_time );
} else {
$size = recurse_dirsize( $directory, null, $max_execution_time );
}
return $size;
}