From ff74fe5add492001766caaafec09f0faa122fbbc Mon Sep 17 00:00:00 2001 From: Carlos Faria Date: Wed, 25 Mar 2020 20:56:03 +0100 Subject: [PATCH] Check correct assets folder existence 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 --- advanced-custom-fields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced-custom-fields.php b/advanced-custom-fields.php index 7c381e0..56b8c24 100644 --- a/advanced-custom-fields.php +++ b/advanced-custom-fields.php @@ -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 {