pre_wp_filesize

pre_wp_filesize

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('pre_wp_filesize') is found 1 times:

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