acf_field_select::format_value()publicACF 3.6

This filter is appied to the $value after it is loaded from the db and before it is returned to the template

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

Хуков нет.

Возвращает

$value. (mixed) the modified value

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

$acf_field_select = new acf_field_select();
$acf_field_select->format_value( $value, $post_id, $field );
$value (обязательный)
-
$post_id (обязательный)
-
$field (обязательный)
-

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

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

Код acf_field_select::format_value() ACF 6.0.4

function format_value( $value, $post_id, $field ) {
	if ( is_array( $value ) ) {
		foreach ( $value as $i => $val ) {
			$value[ $i ] = $this->format_value_single( $val, $post_id, $field );
		}
	} else {
		$value = $this->format_value_single( $value, $post_id, $field );
	}
	return $value;
}