acf_form_widget::acf_validate_save_post()
acf_validate_save_post
This function will loop over $_POST data and validate
Метод класса: acf_form_widget{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$acf_form_widget = new acf_form_widget(); $acf_form_widget->acf_validate_save_post();
Список изменений
С версии 5.4.0 | Введена. |
Код acf_form_widget::acf_validate_save_post() acf form widget::acf validate save post ACF 6.0.4
function acf_validate_save_post() { // phpcs:disable WordPress.Security.NonceVerification.Missing -- Verified elsewhere. // bail early if not widget if ( ! isset( $_POST['_acf_widget_id'] ) ) { return; } // vars $id = sanitize_text_field( $_POST['_acf_widget_id'] ); $number = sanitize_text_field( $_POST['_acf_widget_number'] ); $prefix = sanitize_text_field( $_POST['_acf_widget_prefix'] ); $values = acf_sanitize_request_args( $_POST[ $id ][ $number ]['acf'] ); // validate acf_validate_values( $values, $prefix ); // phpcs:enable WordPress.Security.NonceVerification.Missing }