acf/get_field_count filter-hookACF 5.0.0

Filters the counted number of fields.

Usage

add_filter( 'acf/get_field_count', 'wp_kama_acf_get_field_count_filter', 10, 2 );

/**
 * Function for `acf/get_field_count` filter-hook.
 * 
 * @param int   $count  The number of fields.
 * @param array $parent The field group or field array.
 *
 * @return int
 */
function wp_kama_acf_get_field_count_filter( $count, $parent ){
	// filter...
	return $count;
}
$count(int)
The number of fields.
$parent(array)
The field group or field array.

Changelog

Since 5.0.0 Introduced.

Where the hook is called

acf_get_field_count()
acf/get_field_count
acf/includes/acf-field-functions.php 486
return apply_filters( 'acf/get_field_count', count( $raw_fields ), $parent );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.