Conversation
|
@ryotamoriyama Basically the strategy itself you'd like to achieve is fine, though I would like you to:
Thanks! |
| * 2018.05.12 | ||
| * author:ryota moiryama | ||
| */ | ||
| function my_acf_json_save_point($path) |
There was a problem hiding this comment.
Why not enclosing this into AcfCustomJsonData class?
| * 2018.05.12 | ||
| * author:ryota moiryama | ||
| */ | ||
| function my_acf_json_load_point($paths) |
| * 2018.05.12 | ||
| * author:ryota moiryama | ||
| */ | ||
| function display_acf_option_page() |
| @@ -0,0 +1,58 @@ | |||
| <?php | |||
|
|
|||
| class AcfCustomJsonData | |||
There was a problem hiding this comment.
The classname should be more clear to tell it's responsibility.
| { | ||
| private static $acf_custom_json_data; | ||
|
|
||
| private static $theme_path = '/inc/acf-json'; |
There was a problem hiding this comment.
theme_path seems like pointing to the path of the theme itself.
| { | ||
| } | ||
|
|
||
| public static function get_json_data_path($default_path) |
There was a problem hiding this comment.
This should not have such a global access modifier.
Please make it private along with moving my_acf_json_save_point and other functions into this class.
| public static function get_json_data_path($default_path) | ||
| { | ||
| $path = get_stylesheet_directory() . self::$theme_path; | ||
| if (!file_exists($path)) mkdir($path); |
There was a problem hiding this comment.
mkdir should be run recursively using third param arg.
| WP_ROOT=/var/www/html | ||
| WP_URL=http://localhost | ||
| WP_VERSION=4.8.2 | ||
| WP_VERSION=4.9.5 |
There was a problem hiding this comment.
This change should be made on different PR since they are completely unrelated.
・ACF設定用functionファイルの設置
・env-sampleのデフォルトwpのバージョンを4.9.5にアップデート