Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/szepeviktor/acf-get

Strongly typed Advanced Custom Fields get_field function variants
https://github.com/szepeviktor/acf-get

acf advanced-custom-fields development-tools wordpress wordpress-php-library

Last synced: 3 months ago
JSON representation

Strongly typed Advanced Custom Fields get_field function variants

Awesome Lists containing this project

README

        

# Strongly typed Advanced Custom Fields `get_field()` variants

[![CircleCI](https://circleci.com/gh/szepeviktor/acf-get.svg?style=svg)](https://circleci.com/gh/szepeviktor/acf-get)
[![Packagist](https://img.shields.io/packagist/v/szepeviktor/acf-get.svg?color=239922&style=popout)](https://packagist.org/packages/szepeviktor/acf-get)
[![Packagist](https://img.shields.io/packagist/dt/szepeviktor/acf-get.svg)](https://packagist.org/packages/szepeviktor/acf-get)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-239922)](https://phpstan.org/)

### 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