Metabox::render_template( WP_Post $post_id, array $arguments = array() )
Render the Virtual Events Metabox.
Contents
Parameters
- $post_id
-
(WP_Post) (Required) Which post we are using here.
- $arguments
-
(array) (Optional) Arguments from the metabox, which we use to determine compatibility usage.
Default value: array()
Return
(string) The metabox HTML.
Source
File: src/Tribe/Metabox.php
public function render_template( $post_id, array $arguments = [] ) {
$event = tribe_get_event( $post_id );
if ( ! $event instanceof WP_Post ) {
return '';
}
$args = array_merge(
$arguments,
[
'metabox' => $this,
'post' => $event,
]
);
return $this->template->template( 'virtual-metabox/container', $args, false );
}
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |