acf_field_url::format_valuepublicACF 6.2.6

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

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

Хуков нет.

Возвращает

Разное. $value The modified value

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

$acf_field_url = new acf_field_url();
$acf_field_url->format_value( $value, $post_id, $field, $escape_html );
$value(разное) (обязательный)
The value which was loaded from the database.
$post_id(разное) (обязательный)
The $post_id from which the value was loaded.
$field(массив) (обязательный)
The field array holding all the field options.
$escape_html(true|false) (обязательный)
Should the field return a HTML safe formatted value.

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

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

Код acf_field_url::format_value() ACF 6.4.2

public function format_value( $value, $post_id, $field, $escape_html ) {
	if ( $escape_html ) {
		return esc_url( $value );
	}
	return $value;
}