Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ktmud/odc
ODC Front End
https://github.com/ktmud/odc
Last synced: about 1 month ago
JSON representation
ODC Front End
- Host: GitHub
- URL: https://github.com/ktmud/odc
- Owner: ktmud
- License: mit
- Created: 2019-11-11T05:06:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:51:41.000Z (almost 2 years ago)
- Last Synced: 2024-04-08T01:26:57.729Z (9 months ago)
- Language: JavaScript
- Size: 6.73 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ODC Studios Official Website
Built with Gatsby and Wordpress.
## Fix ACF
Add this to `functions.php`:
```php
if (!function_exists('acf_nullify_empty')) {
/**
* Return `null` if an empty value is returned from ACF.
*
* @param mixed $value
* @param mixed $post_id
* @param array $field
*
* @return mixed
*/
function acf_nullify_empty($value, $post_id, $field) {
if (empty($value)) {
return null;
}
return $value;
}
}add_filter('acf/format_value/type=image', 'acf_nullify_empty', 100, 3);
add_filter('acf/format_value/type=relationship', 'acf_nullify_empty', 100, 3);
add_filter('acf/format_value/type=gallery', 'acf_nullify_empty', 100, 3);
add_filter('acf/format_value/type=taxonomy', 'acf_nullify_empty', 100, 3);
```