acf_field_wysiwyg::format_value()publicACF 3.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_wysiwyg{}

Хуки из метода


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


$acf_field_wysiwyg = new acf_field_wysiwyg();
$acf_field_wysiwyg->format_value( $value, $post_id, $field );
$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

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

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

Код acf_field_wysiwyg::format_value() ACF 6.0.4

function format_value( $value, $post_id, $field ) {
	// Bail early if no value or not a string.
	if ( empty( $value ) || ! is_string( $value ) ) {
		return $value;

	$value = apply_filters( 'acf_the_content', $value );

	// Follow the_content function in /wp-includes/post-template.php
	return str_replace( ']]>', ']]>', $value );