Account_API::get_webinars_support( TribeEventsVirtualMeetingsZoomarray $settings )
Get whether the account supports webinars.
Contents
Parameters
- $settings
-
(<span class="TribeEventsVirtualMeetingsZoomarrayTribeEventsVirtualMeetingsZoomarray<string|">TribeEventsVirtualMeetingsZoommixed>) (Required) The user settings from Zoom.
Return
(boolean) Whether the account supports webinars.
Source
File: src/Tribe/Meetings/Zoom/Account_API.php
public function get_webinars_support( $settings ) {
if ( empty( $settings['feature'] ) ) {
return false;
}
$webinar_values = [
'webinar',
'zoom_events',
];
/**
* Filters the values to look for when detecting if a user has webinar support.
*
* @since 1.8.0
*
* @param array<string|string> $webinar_values The default webinar values to detect.
*/
$webinar_values = (array) apply_filters( 'tec_events_virtual_zoom_webinar_support_values', $webinar_values );
$supports = false;
foreach ( $webinar_values as $webinar_value ) {
if ( empty( $settings['feature'][ $webinar_value ] ) ) {
continue;
}
$supports = true;
break;
}
return $supports;
}
Changelog
| Version | Description |
|---|---|
| 1.8.0 | Introduced. |