ACF_WPML_Compatibility::settings_save_json
settings_save_json
Modifies the json path.
Метод класса: ACF_WPML_Compatibility{}
Хуков нет.
Возвращает
Строку.
Использование
$ACF_WPML_Compatibility = new ACF_WPML_Compatibility(); $ACF_WPML_Compatibility->settings_save_json( $path );
- $path(строка) (обязательный)
- The json save path.
Список изменений
| С версии 5.0.0 | Введена. |
Код ACF_WPML_Compatibility::settings_save_json() ACF WPML Compatibility::settings save json ACF 6.4.2
function settings_save_json( $path ) {
// bail early if dir does not exist
if ( ! wp_is_writable( $path ) ) {
return $path;
}
// ammend
$path = untrailingslashit( $path ) . '/' . acf_get_setting( 'current_language' );
// make dir if does not exist
if ( ! file_exists( $path ) ) {
mkdir( $path, 0777, true ); //phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_mkdir -- Allow legacy mkdir call as this may fire outside admin.
}
// return
return $path;
}