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.2

apply_filters('pre_get_space_used') is found 1 times:

  • /wp-includes/ms-functions.php line 2540
    2536
    2537
    2538
    2539
    2540
    2541
    2542
    2543
    2544
    2545
    * @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: