acf_is_internal_post_type_key()ACF 6.1

Returns true if the given identifier is a ACF internal post type key.

Хуков нет.

Возвращает

true|false.

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

acf_is_internal_post_type_key( $id, $post_type );
$id(строка)
The identifier.
По умолчанию: ''
$post_type(строка)
The ACF post type the key is for.
По умолчанию: 'acf-field-group'

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

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

Код acf_is_internal_post_type_key() ACF 6.4.2

function acf_is_internal_post_type_key( $id = '', $post_type = 'acf-field-group' ) {
	$instance = acf_get_internal_post_type_instance( $post_type );
	if ( ! $instance ) {
		return false;
	}

	return $instance->is_post_key( $id );
}