diff --git a/.gitignore b/.gitignore index e2176d7..123fcdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules bower_components assets/dist +*.sublime-* \ No newline at end of file diff --git a/assets/acf_local_json/index.php b/assets/acf_local_json/index.php new file mode 100644 index 0000000..7f11ef2 --- /dev/null +++ b/assets/acf_local_json/index.php @@ -0,0 +1,3 @@ + 'Site Navigation', 'footer_social' => 'Social Links', 'footer_organize' => 'Organize Links' @@ -49,3 +49,22 @@ function admin_menu_overrides() { 'menu' => 'Theme Options' )); } + +/** + * ACF Local JSON + */ + +// save custom fields +function acf_json_save($path) { + $path = get_stylesheet_directory() . '/assets/acf_local_json'; + return $path; +} +add_filter('acf/settings/save_json', __NAMESPACE__ . '\\acf_json_save'); + +// load custom fields +function acf_json_load($paths) { + unset($paths[0]); + $paths[] = get_stylesheet_directory() . '/assets/acf_local_json'; + return $paths; +} +add_filter('acf/settings/load_json', __NAMESPACE__ . '\\acf_json_load');