Last active
March 8, 2019 14:32
-
-
Save holisticnetworking/e5def0aa68b8beffb6eae0fd3db5abc2 to your computer and use it in GitHub Desktop.
A first attempt at applying new directories with parent failovers to ACF local JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Integrating Advanced Custom Fields: | |
add_filter( 'acf/settings/save_json', function() { | |
return get_stylesheet_directory() . '/Library/Acf-Json'; | |
} ); | |
add_filter( 'acf/settings/load_json', function( $paths ) { | |
unset( $paths[0] ); | |
$paths[] = get_template_directory() . '/Library/Acf-Json'; | |
$paths[] = get_stylesheet_directory() . '/Library/Acf-Json'; | |
return $paths; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment