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

allow filter to short-circuit load_value logic

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

add_filter( 'acf/pre_load_post_id', 'wp_kama_acf_pre_load_post_id_filter', 10, 2 );

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

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

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

acf_get_valid_post_id()
acf/pre_load_post_id
acf/includes/api/api-helpers.php 2474
$preload = apply_filters( 'acf/pre_load_post_id', null, $post_id );

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

acf/includes/local-meta.php 31
add_filter( 'acf/pre_load_post_id', array( $this, 'pre_load_post_id' ), 1, 2 );