Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ktmud/odc

ODC Front End
https://github.com/ktmud/odc

Last synced: about 1 month ago
JSON representation

ODC Front End

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);
```