acf/filesize

acf/filesize

Hook Type: filter

See hook in core

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

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

  • /includes/api/api-helpers.php line 2627
    2623
    2624
    2625
    2626
    2627
    2628
    2629
    2630
    2631
    2632
    2633
         *
         * @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 );
        }
    }