pre_wp_filesize

pre_wp_filesize

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('pre_wp_filesize') is found 1 times:

  • /wp-includes/functions.php line 3605
    3601
    3602
    3603
    3604
    3605
    3606
    3607
    3608
    3609
    3610
    3611
    *
     * @param null|int $size The unfiltered value. Returning an int from the callback bypasses the filesize call.
     * @param string   $path Path to the file.
     */
    $size = apply_filters( 'pre_wp_filesize', null, $path );
     
    if ( is_int( $size ) ) {
        return $size;
    }
     
    $size = file_exists( $path ) ? (int) filesize( $path ) : 0;