acf/is_image_field хук-фильтрACF 6.8.7

Filters whether the supplied field should be treated as an image field.

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

add_filter( 'acf/is_image_field', 'wp_kama_acf_is_image_field_filter', 10, 2 );

/**
 * Function for `acf/is_image_field` filter-hook.
 * 
 * @param bool  $is_image_field Whether the field only accepts image uploads.
 * @param array $field          The field array.
 *
 * @return bool
 */
function wp_kama_acf_is_image_field_filter( $is_image_field, $field ){

	// filter...
	return $is_image_field;
}
$is_image_field(true|false)
Whether the field only accepts image uploads.
$field(массив)
The field array.

Список изменений

С версии 6.8.7 Введена.

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

acf_is_image_field()
acf/is_image_field
acf/includes/api/api-helpers.php 3056
return (bool) apply_filters( 'acf/is_image_field', false, $field );
acf/includes/api/api-helpers.php 3076
$is_image_field = apply_filters( 'acf/is_image_field', $is_image_field, $field );

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

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