acf/json/save_paths filter-hookACF 6.2

Filters the paths used to save JSON.

Usage

add_filter( 'acf/json/save_paths', 'wp_kama_acf_json_save_paths_filter', 10, 2 );

/**
 * Function for `acf/json/save_paths` filter-hook.
 * 
 * @param array $paths An array of the potential paths to save JSON to.
 * @param array $post  The ACF field group, post type, or taxonomy array.
 *
 * @return array
 */
function wp_kama_acf_json_save_paths_filter( $paths, $post ){
	// filter...
	return $paths;
}
$paths(array)
An array of the potential paths to save JSON to.
$post(array)
The ACF field group, post type, or taxonomy array.

Changelog

Since 6.2 Introduced.

Where the hook is called

ACF_Local_JSON::get_save_paths()
acf/json/save_paths
acf/includes/local-json.php 210
return (array) apply_filters( 'acf/json/save_paths', $paths, $post );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.