<?php
/**
 * ACF JSON field registration and management.
 *
 * @package EventimUSEventListings
 */

defined( 'ABSPATH' ) || exit;

// Register ACF savepoint.
add_filter( 'acf/settings/save_json', 'evusel_acf_json_save_point' );
/**
 * Set ACF JSON save point.
 *
 * @param string $path Default save path.
 * @return string Custom save path.
 */
function evusel_acf_json_save_point( $path ) {
	return EvuselConfig::$ACFJsonPath;
}

// Register ACF load point.
add_filter( 'acf/settings/load_json', 'evusel_acf_json_load_point' );
/**
 * Set ACF JSON load point.
 *
 * @param array $paths Default load paths.
 * @return array Modified load paths.
 */
function evusel_acf_json_load_point( $paths ) {
	$paths[0] = EvuselConfig::$ACFJsonPath;
	return $paths;
}
