Metabox::register_fields()
Register all the fields in the Rest API for this metabox.
Source
File: src/Tribe/Metabox.php
public function register_fields() {
foreach ( Event_Meta::$virtual_event_keys as $key ) {
register_post_meta(
'tribe_events',
$key,
[
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'auth_callback' => static function() {
return current_user_can( 'edit_posts' );
},
]
);
}
}
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |