acf_field_true_false::format_value_for_restpublicACF 1.0

Apply basic formatting to prepare the value for default REST output.

Method of the class: acf_field_true_false{}

No Hooks.

Returns

Mixed.

Usage

$acf_field_true_false = new acf_field_true_false();
$acf_field_true_false->format_value_for_rest( $value, $post_id, $field );
$value(mixed) (required)
.
$post_id(string|int) (required)
.
$field(array) (required)
.

acf_field_true_false::format_value_for_rest() code ACF 6.0.4

public function format_value_for_rest( $value, $post_id, array $field ) {
	return (bool) $value;
}