pre_get_space_used

pre_get_space_used

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('pre_get_space_used') is found 1 times:

  • /wp-includes/ms-functions.php line 2540
    	 * @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;
    	}
    
    

See this hook used in plugins: