acf_field_select::load_valuepublicACF 3.6

This filter is applied to the $value after it is loaded from the db

Method of the class: acf_field_select{}

No Hooks.

Returns

$value.

Usage

$acf_field_select = new acf_field_select();
$acf_field_select->load_value( $value, $post_id, $field );
$value(required)
.
$post_id(required)
.
$field(required)
.

Changelog

Since 3.6 Introduced.

acf_field_select::load_value() code ACF 6.0.4

function load_value( $value, $post_id, $field ) {

	// Return an array when field is set for multiple.
	if ( $field['multiple'] ) {
		if ( acf_is_empty( $value ) ) {
			return array();
		}
		return acf_array( $value );
	}

	// Otherwise, return a single value.
	return acf_unarray( $value );
}