acf/validate_post_id хук-фільтрACF 1.0

filter for 3rd party

Використання

add_filter( 'acf/validate_post_id', 'wp_kama_acf_validate_post_id_filter');

/**
 * Function for `acf/validate_post_id` filter-hook.
 *
 * @param $post_id
 *
 * @return
 */
function wp_kama_acf_validate_post_id_filter( $post_id ){

	// Filter...
	return $post_id;
}
$post_id

Де викликається хук

acf/validate_post_id

acf/includes/api/api-helpers.php 2560

$post_id = apply_filters( 'acf/validate_post_id', $post_id, $_post_id );

Де використовується хук в Advanced Custom Fields

acf/includes/revisions.php 36

add_filter( 'acf/validate_post_id', array( $this, 'acf_validate_post_id' ), 10, 2 );

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *