ACF\Meta

Option::get_valuepublicACF 6.4

Retrieves a field value from the database.

Method of the class: Option{}

No Hooks.

Returns

Mixed.

Usage

$Option = new Option();
$Option->get_value( $object_id, $field );
$object_id(int|string)
The ID of the object the metadata is for.
$field(array)
The field array.
Default: array()

Changelog

Since 6.4 Introduced.

Option::get_value() code ACF 6.8.8

public function get_value( $object_id = 0, array $field = array() ) {
	return get_option( $object_id . '_' . $field['name'], null );
}