acf_get_field_reference()ACF 5.6.5

Deprecated since 5.6.8. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

acf_get_field_reference

Finds the field key for a given field name and post_id.

No Hooks.

Returns

String. $reference The field key

Usage

acf_get_field_reference( $field_name, $post_id );
$field_name(string) (required)
The name of the field. eg 'sub_heading'.
$post_id(mixed) (required)
The post_id of which the value is saved against.

Changelog

Since 5.6.5 Introduced.
Deprecated since 5.6.8

acf_get_field_reference() code ACF 6.8.8

function acf_get_field_reference( $field_name, $post_id ) {

	// Warning.
	_deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_reference()' );

	// Return reference.
	return acf_get_reference( $field_name, $post_id );
}