acf_field_repeater::pre_render_fieldspublicACF 6.0.0

Runs on the "acf/pre_render_fields" filter. Used to signify that we're currently rendering a repeater field.

Method of the class: acf_field_repeater{}

No Hooks.

Returns

Array.

Usage

$acf_field_repeater = new acf_field_repeater();
$acf_field_repeater->pre_render_fields( $fields, $post_id );
$fields(array) (required)
The main field array.
$post_id(mixed)
The post ID for the field being rendered.
Default: false

Changelog

Since 6.0.0 Introduced.

acf_field_repeater::pre_render_fields() code ACF 6.8.8

public function pre_render_fields( $fields, $post_id = false ) {
	if ( is_admin() ) {
		$this->is_rendering = true;
		$this->post_id      = $post_id;
	}

	return $fields;
}