acf/load_reference
Filters the reference value.
Usage
add_filter( 'acf/load_reference', 'wp_kama_acf_load_reference_filter', 10, 3 );
/**
* Function for `acf/load_reference` filter-hook.
*
* @param string $reference The reference value.
* @param string $field_name The field name.
* @param int|string $post_id The post ID where meta is stored.
*
* @return string
*/
function wp_kama_acf_load_reference_filter( $reference, $field_name, $post_id ){
// filter...
return $reference;
}
- $reference(string)
- The reference value.
- $field_name(string)
- The field name.
- $post_id(int|string)
- The post ID where meta is stored.
Changelog
| Since 5.7.11 | Introduced. |
Where the hook is called
acf/includes/acf-value-functions.php 65
return apply_filters( 'acf/load_reference', $reference, $field_name, $post_id );