From 17005f623b372160429702c51490fbb4c4775e21 Mon Sep 17 00:00:00 2001 From: Deepen Bajracharya Date: Wed, 24 Jan 2024 13:03:32 +0545 Subject: [PATCH] Gallery view fix --- README.txt | 7 +++++-- includes/Bootstrap.php | 14 +++++++------- includes/Shortcodes/Embed.php | 5 +++-- templates/shortcode/embed-session.php | 2 +- video-conferencing-with-zoom-api.php | 4 ++-- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.txt b/README.txt index 74d9f95c..4639a163 100755 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ Tags: zoom video conference, video conference, zoom, zoom video conferencing, we Donate link: https://www.paypal.com/donate?hosted_button_id=2UCQKR868M9WE Requires at least: 5.0 Tested up to: 6.3 -Stable tag: 4.4.0 +Stable tag: 4.4.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -159,7 +159,10 @@ Yes, you should be registered in Zoom. Also, depending on the zoom account plan == Changelog == -= 4.4.0 January 16th, 2023 = += 4.4.1 January 2th, 2024 = +* Fixed: Gallery View should now be supported for IFrame join via browser shortcode. + += 4.4.0 January 16th, 2024 = * Recordings hidable and bug fixes. * Updated: Fetch Meeting ID recordings asynchronously. * Updated websdk to version 2.18.2 diff --git a/includes/Bootstrap.php b/includes/Bootstrap.php index 0df58849..432b5a36 100644 --- a/includes/Bootstrap.php +++ b/includes/Bootstrap.php @@ -50,7 +50,7 @@ public function __construct() { add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_backend' ) ); add_action( 'init', array( $this, 'load_plugin_textdomain' ) ); - //Block Themes Compat: register scripts on init - required as block themes fire the content before page render + //Block Themes Compat: register scripts on init - required as block themes fire the content before page render add_action( 'init', [ $this, 'register_scripts' ] ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_filter( 'plugin_action_links', array( $this, 'action_link' ), 10, 2 ); @@ -105,7 +105,7 @@ public function version_update_warning( $current_version, $new_version ) { */ function set_corp_headers( $headers, $wp ) { $type = filter_input( INPUT_GET, 'type' ); - if ( isset( $wp->query_vars['post_type'] ) && $wp->query_vars['post_type'] == 'zoom-meetings' && ! empty( $type ) ) { + if ( ( isset( $wp->query_vars['post_type'] ) && $wp->query_vars['post_type'] == 'zoom-meetings' && ! empty( $type ) ) || has_shortcode( get_post()->post_content, 'zoom_join_via_browser' ) ) { $headers['Cross-Origin-Embedder-Policy'] = 'require-corp'; $headers['Cross-Origin-Opener-Policy'] = 'same-origin'; } @@ -133,7 +133,7 @@ protected function init_api() { /** * @return void */ - public function register_scripts( ) { + public function register_scripts() { $minified = SCRIPT_DEBUG ? '' : '.min'; wp_register_style( 'video-conferencing-with-zoom-api', ZVC_PLUGIN_PUBLIC_ASSETS_URL . '/css/style' . $minified . '.css', false, $this->plugin_version ); @@ -152,8 +152,8 @@ public function register_scripts( ) { 'video-conferencing-with-zoom-api-moment', ), $this->plugin_version, true ); } - } - + } + /** * Load Frontend Scriptsssssss * @@ -241,8 +241,8 @@ protected function load_dependencies() { Blocks::get_instance(); BlockTemplates::get_instance(); - //Helpers - Encryption::get_instance(); + //Helpers + Encryption::get_instance(); } /** diff --git a/includes/Shortcodes/Embed.php b/includes/Shortcodes/Embed.php index 31417ed2..77fdea05 100644 --- a/includes/Shortcodes/Embed.php +++ b/includes/Shortcodes/Embed.php @@ -86,6 +86,7 @@ public function join_via_browser( $atts, $content = null ) { if ( is_wp_error( $meetingInfo ) ) { echo $meetingInfo->get_error_message(); + return; } else { $meeting = json_decode( $meetingInfo ); @@ -113,12 +114,12 @@ public function join_via_browser( $atts, $content = null ) { $meeting_time = date( 'Y-m-d h:i a', strtotime( $start_time ) ); } - if( !empty($meeting->timezone) ) { + if ( ! empty( $meeting->timezone ) ) { $meeting->meeting_timezone_time = Date::dateConverter( 'now', $meeting->timezone, false ); $meeting->meeting_time_check = Date::dateConverter( $meeting_time, $meeting->timezone, false ); } - $meeting->shortcode_attributes = $attributes; + $meeting->shortcode_attributes = $attributes; $GLOBALS['zoom'] = $meeting; diff --git a/templates/shortcode/embed-session.php b/templates/shortcode/embed-session.php index faf199c7..5311d941 100644 --- a/templates/shortcode/embed-session.php +++ b/templates/shortcode/embed-session.php @@ -73,7 +73,7 @@ ?>
- +