-
Notifications
You must be signed in to change notification settings - Fork 7
Develop #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Develop #22
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not enclosing this into AcfCustomJsonData class?
| * 2018.05.12 | ||
| * author:ryota moiryama | ||
| */ | ||
| function my_acf_json_load_point($paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| * 2018.05.12 | ||
| * author:ryota moiryama | ||
| */ | ||
| function display_acf_option_page() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| @@ -0,0 +1,58 @@ | |||
| <?php | |||
|
|
|||
| class AcfCustomJsonData | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should be made on different PR since they are completely unrelated.
・ACF設定用functionファイルの設置
・env-sampleのデフォルトwpのバージョンを4.9.5にアップデート