Skip to content

szepeviktor/acf-get

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 

Strongly typed Advanced Custom Fields get_field() variants

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