szepeviktor/acf-get

Strongly typed Advanced Custom Fields get_field function variants

v0.4.1 2020-06-04 18:55 UTC

This package is auto-updated.

Last update: 2024-04-05 03:53:13 UTC


README

CircleCI Packagist Packagist PHPStan

Installation

composer require szepeviktor/acf-get or copy all src/*.php files to your theme or plugin.

Usage

For example ACFget::boolField($name) returns a boolean for sure.

Field status

  • Undefined ACF field
  • Missing value, not in post meta
  • Empty value when it is possible, e.g. "Allow null" is enabled in Select fields
  • Existing value