acf/pre_save_post хук-фильтрACF 1.0

allow for custom save

Использование

add_filter( 'acf/pre_save_post', 'wp_kama_acf_pre_save_post_filter', 10, 2 );

/**
 * Function for `acf/pre_save_post` filter-hook.
 * 
 * @param  $post_id 
 * @param  $form    
 *
 * @return 
 */
function wp_kama_acf_pre_save_post_filter( $post_id, $form ){

	// filter...
	return $post_id;
}
$post_id
-
$form
-

Где вызывается хук

acf_form_front::submit_form()
acf/pre_save_post
acf/includes/forms/form-front.php 425
$post_id = apply_filters( 'acf/pre_save_post', $post_id, $form );

Где используется хук в Advanced Custom Fields PRO

acf/includes/forms/form-front.php 69
add_filter( 'acf/pre_save_post', array( $this, 'pre_save_post' ), 5, 2 );