JSON field for Advanced Custom Fields.
// Get encoded JSON
$json = get_field('json_field');
// Decode JSON to object
$value = json_decode($json);
// Use the values
echo $value->something;
<script type="text/javascript">
window.my_acf_name = <?php echo get_field('json_field') ?>;
</script>
JSON field for Advanced Custom Fields.
This ACF field type is compatible with:
acf-field-type-json
folder into your wp-content/plugins
foldercomposer run-script test
With local setup
composer run-script test:wordpress
Using docker
docker-compose run phpunit
composer install
composer:test:wordpress
Please see readme.txt
for changelog
This ACF field relies heavily on great package https://github.com/josdejong/jsoneditor