Event_Meta::should_show_password( WP_Post $event )
Determines if the password should be shown based on the virtual_show_embed_to setting of the event.
Contents
Parameters
- $event
-
(WP_Post) (Required) The event post object, as decorated by the
tribe_get_eventfunction.
Return
(boolean)
Source
File: src/Tribe/Meetings/Webex/Event_Meta.php
public static function should_show_password( $event ) {
if ( ! $event instanceof WP_Post ) {
return false;
}
$show = ! in_array( Virtual_Event_Meta::$value_show_embed_to_logged_in, $event->virtual_show_embed_to, true ) || is_user_logged_in();
/**
* Filters whether the virtual content should show or not.
*
* @since 1.0.4
*
* @param boolean $show If the virtual content should show or not.
* @param WP_Post $event The event post object, as decorated by the `tribe_get_event` function.
*/
return apply_filters( 'tec_events_virtual_show_virtual_content', $show, $event );
}
Changelog
| Version | Description |
|---|---|
| 1.9.0 | Introduced. |