Skip to content

Commit

Permalink
Check correct assets folder existence
Browse files Browse the repository at this point in the history
Using Sage 9, in first call, if acf-json folder doesn't exist (as it hasn't been created yet), the saving function from ACF returns a Warning: mkdir(): No such file or directory as the path that is trying to create doesn't exist as the code goes the Sage 10 else...

Before:
themes/theme-name/resources/resources/assets/acf-json

After
themes/theme-name/resources/assets/acf-json

Fixed checking the correct folder existence for Sage 9
  • Loading branch information
cfaria authored Mar 25, 2020
1 parent bdcf717 commit ff74fe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion advanced-custom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// Set Sage9 friendly path at /theme-directory/resources/assets/acf-json

if (is_dir(get_stylesheet_directory() . '/assets/acf-json')) {
if (is_dir(get_stylesheet_directory() . '/assets')) {
// This is Sage 9
$path = get_stylesheet_directory() . '/assets/acf-json';
} else {
Expand Down

0 comments on commit ff74fe5

Please sign in to comment.