acf_form_front::validate_save_post() public ACF 5.4.0
This function will validate fields from the above array
{} Это метод класса: acf_form_front{}
Хуков нет.
Возвращает
$post_id. (int)
Использование
$acf_form_front = new acf_form_front(); $acf_form_front->validate_save_post();
Список изменений
С версии 5.4.0 | Введена. |
Код acf_form_front::validate_save_post() acf form front::validate save post ACF 5.9.1
function validate_save_post() {
// register field if isset in $_POST
foreach( $this->fields as $k => $field ) {
// bail early if no in $_POST
if( !isset($_POST['acf'][ $k ]) ) continue;
// register
acf_add_local_field($field);
}
// honeypot
if( !empty($_POST['acf']['_validate_email']) ) {
acf_add_validation_error( '', __('Spam Detected', 'acf') );
}
}