ACF\Meta
Option::get_value
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() 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 );
}