acf/load_attachment
Filters attachment $response after it has been loaded.
Використання
add_filter( 'acf/load_attachment', 'wp_kama_acf_load_attachment_filter', 10, 3); /** * Function for `acf/load_attachment` filter-hook. * * @param array $response Array of loaded attachment data. * @param WP_Post $attachment Attachment object. * @param array | false $ meta Array of attachment meta data, або false if there is none. * * @return array */ function wp_kama_acf_load_attachment_filter( $response, $attachment, $meta ){ // Filter... return $response; }
-
$response
(масив) - Array of loaded attachment data.
-
$attachment
( WP_Post ) - Приоб’єднанні об’єкта.
-
$meta
(масив|false) - Array of attachment meta data, або false if there is none.
список змін
З версії 5.9.0 | Введено. |
Де викликається хук
acf/load_attachment
acf/includes/api/api-helpers.php 3078
return apply_filters( 'acf/load_attachment', $response, $attachment, $meta);
Де використовується хук в Advanced Custom Fields
Використання не знайдено.