acf/load_reference filter-hookACF 5.7.11

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_get_reference()
acf/load_reference
acf/includes/acf-value-functions.php 65
return apply_filters( 'acf/load_reference', $reference, $field_name, $post_id );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.