carbon-fields
carbon-fields copied to clipboard
Runtime loading value of html field
Version
- Carbon Fields: 3
- WordPress: 5.2
- PHP: 7.2
Expected Behavior
When using a Callable with HTML field, it should be run at runtime like set_options of select.
Actual Behavior
The callable is called immediately, causing multiple issues like some post_type not being registered, or meta values unavailable at current time.
Container definition
$fields[] = Field::make('html', $prefix . 'example', __('Event', 'dallinge'))
->set_html('callback');
Fixed in https://github.com/htmlburger/carbon-fields/pull/845