Classic_Editor::render_initial_zoom_setup_options( null|WP_Post|int $post = null, bool $echo = true )
Renders, echoing to the page, the Zoom API initial setup options.
Contents
Parameters
- $post
-
(null|WP_Post|int) (Optional) The post object or ID of the event to generate the controls for, or
nullto use the global post object.Default value: null
- $echo
-
(bool) (Optional) Whether to echo the template contents to the page (default) or to return it.
Default value: true
Return
(string) The template contents, if not rendered to the page.
Source
File: src/Tribe/Meetings/Zoom/Classic_Editor.php
public function render_initial_zoom_setup_options( $post = null, $echo = true ) {
$post = tribe_get_event( $post );
if ( ! $post instanceof \WP_Post ) {
return '';
}
// Make sure to apply the Zoom properties to the event.
Zoom_Meta::add_event_properties( $post );
// If an account is found, load the meeting generation links or details.
$account_id = $this->api->get_account_id_in_admin();
if ( $account_id ) {
return $this->render_meeting_link_generator( $post, true, false, $account_id );
}
// Get the list of accounts and if none show the link to setup zoom integration.
$accounts = $this->api->get_formatted_account_list( true );
if ( empty( $accounts ) ) {
return $this->render_api_connection_link( $post, $echo );
}
return $this->render_account_selection( $post, $accounts );
}
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |