Files
bedrock/web/app/themes/badegg/app/ACF/JSON.php
Steve Ross 03e84836ca Add 'web/app/themes/badegg/' from commit 'b31aa7550b02a4516fdf161f53dc7666854c9a14'
git-subtree-dir: web/app/themes/badegg
git-subtree-mainline: b862ff9755
git-subtree-split: b31aa7550b
2025-11-22 17:26:50 +00:00

26 lines
509 B
PHP

<?php
namespace App\ACF;
class JSON
{
public function __construct()
{
add_filter('acf/settings/save_json', [$this, 'save']);
add_filter('acf/settings/load_json', [$this, 'load']);
}
public function save( $path )
{
$path = get_stylesheet_directory() . '/resources/acf';
return $path;
}
public function load( $paths )
{
unset($paths[0]);
$paths[] = get_stylesheet_directory() . '/resources/acf';
return $paths;
}
}