_acf_apply_unique_field_group_slug()ACF 5.7.10

_acf_apply_unique_field_group_slug

Allows full control over 'acf-field-group' slugs.

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Returns

null. Nothing (null).

Usage

_acf_apply_unique_field_group_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug );
$slug(string) (required)
The post slug.
$post_ID(int) (required)
Post ID.
$post_status(string) (required)
The post status.
$post_type(string) (required)
Post type.
$post_parent(int) (required)
Post parent ID.
$original_slug(string) (required)
The original post slug.

Changelog

Since 5.7.10 Introduced.

_acf_apply_unique_field_group_slug() code ACF 6.8.8

function _acf_apply_unique_field_group_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) {

	// Check post type and reset to original value.
	if ( $post_type === 'acf-field-group' ) {
		return $original_slug;
	}

	// Return slug.
	return $slug;
}