acf_field_gallery::save_sidebar_field_values │ private │ ACF 6.8.11

Saves the sidebar's ACF values to an attachment, restricted to the fields rendered for it or belonging to its own field groups.

The sidebar renders each attachment's fields for the attachment, so its field list is bound to the attachment ID. Each attachment saves a copy, as acf_save_post() overwrites $_POST['acf'] with the values it's given.

Метод класса: acf_field_gallery{}

Хуков нет.

Возвращает

void. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->save_sidebar_field_values( $id, $values );
$id(int) (обязательный)
The attachment ID.
$values(массив) (обязательный)
The sidebar's ACF values.

Список изменений

С версии 6.8.11 Введена.

Код acf_field_gallery::save_sidebar_field_values() ACF 6.8.11

private function save_sidebar_field_values( $id, $values ) {
	acf_save_post( $id, acf_filter_save_values( $values, _acf_get_attachment_save_args( $id ) ) );
}