acf/filesize

acf/filesize

Hook Type: filter

See hook in core

Displaying hooks found in version: advanced-custom-fields.6.3.5

apply_filters('acf/filesize') is found 1 times:

  • /includes/api/api-helpers.php line 2611
    2607
    2608
    2609
    2610
    2611
    2612
    2613
    2614
    2615
    2616
    2617
         *
         * @param int|null The default filesize.
         * @param WP_Post $attachment The attachment post object we're looking for the filesize for.
         */
        $shortcut_filesize = apply_filters( 'acf/filesize', null, $attachment );
        if ( $shortcut_filesize ) {
            $response['filesize'] = intval( $shortcut_filesize );
        } elseif ( file_exists( $attached_file ) ) {
            $response['filesize'] = filesize( $attached_file );
        }
    }