acf_field_file::update_value()
This filter is appied to the $value before it is updated in the db
Метод класса: acf_field_file{}
Хуков нет.
Возвращает
$value
. - the modified value
Использование
$acf_field_file = new acf_field_file(); $acf_field_file->update_value( $value, $post_id, $field );
- $value (обязательный)
- -
- $post_id (обязательный)
- -
- $field (обязательный)
- -
Список изменений
С версии 3.6 | Введена. |
Код acf_field_file::update_value() acf field file::update value ACF 6.0.4
function update_value( $value, $post_id, $field ) { // Bail early if no value. if ( empty( $value ) ) { return $value; } // Parse value for id. $attachment_id = acf_idval( $value ); // Connect attacment to post. acf_connect_attachment_to_post( $attachment_id, $post_id ); // Return id. return $attachment_id; }