The module is shipped with a fully functional Json/PHP Sync feature, cousin of the native ACF Field Group Json/PHP Sync.
The default PHP Sync path is located in /my-theme/acfe-php/taxonomies
.
/**
* acfe/settings/php_save/taxonomies
*
* @string $path Save path
* @array $taxonomy Taxonomy array
*/
filter('acfe/settings/php_save/taxonomies', $path);
filter('acfe/settings/php_save/taxonomies/all', $path, $taxonomy);
filter('acfe/settings/php_save/taxonomies/ID=122', $path, $taxonomy);
filter('acfe/settings/php_save/taxonomies/name=my-taxonomy', $path, $taxonomy);
add_filter('acfe/settings/php_save/taxonomies/name=my-taxonomy', 'my_acfe_php_save_point', 10, 2);
function my_acfe_php_save_point($path, $taxonomy){
return get_stylesheet_directory() . '/my-php-folder';
}
/**
* acfe/settings/php_load/taxonomies
*
* @array $paths Load paths
*/
filter('acfe/settings/php_load/taxonomies', $paths);
add_filter('acfe/settings/php_load/taxonomies', 'my_acfe_php_load_point');
function my_acfe_php_load_point($paths){
// append path
$paths[] = get_stylesheet_directory() . '/my-php-folder';
// return
return $paths;
}
The default Json Sync path is located in /my-theme/acf-json/taxonomies
.
/**
* acfe/settings/json_save/taxonomies
*
* @string $path Save path
* @array $taxonomy Taxonomy array
*/
filter('acfe/settings/json_save/taxonomies', $path);
filter('acfe/settings/json_save/taxonomies/all', $path, $taxonomy);
filter('acfe/settings/json_save/taxonomies/ID=122', $path, $taxonomy);
filter('acfe/settings/json_save/taxonomies/name=my-taxonomy', $path, $taxonomy);
add_filter('acfe/settings/json_save/taxonomies/name=my-taxonomy', 'my_acfe_json_save_point', 10, 2);
function my_acfe_json_save_point($path, $taxonomy){
return get_stylesheet_directory() . '/my-json-folder';
}
/**
* acfe/settings/json_load/taxonomies
*
* @array $paths Load paths
*/
filter('acfe/settings/json_load/taxonomies', $paths);
add_filter('acfe/settings/json_load/taxonomies', 'my_acfe_json_load_point');
function my_acfe_json_load_point($paths){
// append path
$paths[] = get_stylesheet_directory() . '/my-json-folder';
// return
return $paths;
}