ACF_Internal_Post_Type::apply_unique_post_slugpublicACF 6.1

Allows full control over ACF post slugs.

Метод класса: ACF_Internal_Post_Type{}

Хуков нет.

Возвращает

Строку.

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

$ACF_Internal_Post_Type = new ACF_Internal_Post_Type();
$ACF_Internal_Post_Type->apply_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug );
$slug(строка) (обязательный)
The post slug.
$post_ID(int) (обязательный)
Post ID.
$post_status(строка) (обязательный)
The post status.
$post_type(строка) (обязательный)
Post type.
$post_parent(int) (обязательный)
Post parent ID.
$original_slug(строка) (обязательный)
The original post slug.

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

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

Код ACF_Internal_Post_Type::apply_unique_post_slug() ACF 6.4.2

public function apply_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) {
	// Check post type and reset to original value.
	if ( $post_type === $this->post_type ) {
		return $original_slug;
	}

	return $slug;
}