acf/filesize
acf/filesize
Appears in: advanced-custom-fields.6.3.5
Hook Type: filter
Displaying hooks found in version: advanced-custom-fields.6.3.5apply_filters('acf/filesize') is found 1 times:
- /includes/api/api-helpers.php line 261126072608260926102611261226132614261526162617
*
* @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
);
}
}