acf/pre_load_reference хук-фильтрACF 1.0

Allow filter to short-circuit load_value logic.

Использование

add_filter( 'acf/pre_load_reference', 'wp_kama_acf_pre_load_reference_filter', 10, 3 );

/**
 * Function for `acf/pre_load_reference` filter-hook.
 * 
 * @param  $null       
 * @param  $field_name 
 * @param  $post_id    
 *
 * @return 
 */
function wp_kama_acf_pre_load_reference_filter( $null, $field_name, $post_id ){

	// filter...
	return $null;
}
$null
-
$field_name
-
$post_id
-

Где вызывается хук

acf_get_reference()
acf/pre_load_reference
acf/includes/acf-value-functions.php 21
$reference = apply_filters( 'acf/pre_load_reference', null, $field_name, $post_id );

Где используется хук в Advanced Custom Fields

acf/includes/forms/form-customizer.php 237
add_filter( 'acf/pre_load_reference', array( $this, 'pre_load_reference' ), 10, 3 );