ACF_WPML_Compatibility::settings_save_jsonpublicACF 5.0.0

settings_save_json

Modifies the json path.

Method of the class: ACF_WPML_Compatibility{}

No Hooks.

Returns

String.

Usage

$ACF_WPML_Compatibility = new ACF_WPML_Compatibility();
$ACF_WPML_Compatibility->settings_save_json( $path );
$path(string) (required)
The json save path.

Changelog

Since 5.0.0 Introduced.

ACF_WPML_Compatibility::settings_save_json() code ACF 6.0.4

function settings_save_json( $path ) {

	// bail early if dir does not exist
	if ( ! 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 );
	}

	// return
	return $path;
}