Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/szepeviktor/acf-get
- Owner: szepeviktor
- Created: 2019-07-28T14:01:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T18:56:01.000Z (over 4 years ago)
- Last Synced: 2024-10-09T12:25:26.601Z (3 months ago)
- Topics: acf, advanced-custom-fields, development-tools, wordpress, wordpress-php-library
- Language: PHP
- Homepage: https://support.advancedcustomfields.com/forums/topic/strongly-typed-values/
- Size: 43 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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