Skip to content
Corex

AcfFieldDriver

Corex\Fields\AcfFieldDriver · class · Core layer

The ACF field driver: reads/writes through ACF’s own API so complex field types and return-format coercion are handled. Selected by FieldResolver only when ACF is present (spec FR-009); never referenced when ACF is absent (FR-010).

get(int $entityId, string $key, mixed $default): mixed

Section titled “get(int $entityId, string $key, mixed $default): mixed”

set(int $entityId, string $key, mixed $value): void

Section titled “set(int $entityId, string $key, mixed $value): void”

ACF hands a post’s value to update_metadata(), which takes one level of slashes off, as WordPress does for its own forms. The value is slashed first so a backslash is stored as it was given, the same as {@see MetaFieldDriver::set()} (DECISIONS #331).