Skip to content

Instantly share code, notes, and snippets.

View techies23's full-sized avatar
🎧
Beep Beep

Deepen Bajracharya techies23

🎧
Beep Beep
View GitHub Profile
@techies23
techies23 / functions.php
Created December 16, 2020 09:12
Show custom user roles on Assign to Host ID page
add_filter('zvc_allow_zoom_host_id_user_role', 'vczapi_allow_host_id_roles');
function vczapi_allow_host_id_roles($roles) {
$roles[] = 'your_user_role_slug_1';
$roles[] = 'your_user_role_slug_2';
return $roles;
}
@techies23
techies23 / functions.php
Created January 18, 2021 06:43
Deactivate Moment JS of Video Conferencing with Zoom API plugin for removing conflicts
//Paste below to your functions.php file in your theme
function codemanas_dequeue_script() {
wp_dequeue_script( 'video-conferencing-with-zoom-api-moment' );
wp_deregister_script( 'video-conferencing-with-zoom-api-moment' );
wp_dequeue_script( 'video-conferencing-with-zoom-api-moment-timezone' );
wp_deregister_script( 'video-conferencing-with-zoom-api-moment-timezone' );
}
add_action( 'wp_print_scripts', 'codemanas_dequeue_script', 100 );
@techies23
techies23 / functions.php
Created February 3, 2021 09:48
Change role for WP user. For Video conferencing zoom PRO when registering in a meeting a new user is created role.
//Add below code to your theme's functions.php file
add_filter('vczapi_pro_on_wp_user_create', 'vczapi_change_role');
function vczapi_change_role( $role ) {
$role['role'] = 'your_custom_role';
return $role;
}
@techies23
techies23 / register.php
Created February 23, 2021 11:08
Change registration link to default Zoom registration link instead of native site link.
<?php
/**
* The template for displaying meeting join and start links
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom-pro/fragments/join-links.php.
*
* @author Deepen.
* @created_on 11/19/19
*/
@techies23
techies23 / functions.php
Created February 25, 2021 07:34
Directly letting users join meeting via browser without further interaction.
<?php
/**
* Paste below code to your functions.php file in your theme.
*
* NOTE: If user is not logged in this code will not work because when joining a meeting from browser - User name is a required field and since
* this below code directly triggers the join button on load. Users will not be able to join the meeting without a name.
*
* The reason this would work with logged in users is because username is already selected in the join via browser page if a user is logged in.
*/
add_action( 'vczapi_join_via_browser_after_script_load', function () {
@techies23
techies23 / zoom-recordings.php
Created March 1, 2021 05:46
Bypass pop-up when clicking “View Recording” [zoom_list_host_meetings host=”YOUR_HOST_ID”]
<?php
/**
* The Template for displaying list of recordings via Host ID
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-recordings.php.
*
* @package Video Conferencing with Zoom API/Templates
* @version 3.5.0
*/
<?php
/**
* The Template for displaying list of recordings via meeting ID
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-recordings-by-meeting.php.
*
* @package Video Conferencing with Zoom API/Templates
* @version 3.5.0
*/
<?php
/**
* The Template for displaying all single meetings
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-listing.php.
*
* @package Video Conferencing with Zoom API/Templates
* @version 3.2.2
* @updated 3.6.0
*/
@techies23
techies23 / functions.php
Last active September 7, 2021 07:12
Remove purchase restriction for WooCommerce integration for Zoom Meetings
add_filter( 'vczapi_woocommerce_check_deadline_crossed_meeting_date', 'vczapi_deadline_check', 20 );
/**
* @param $meeting_date DateTime
*
* @return mixed
*/
function vczapi_deadline_check( $meeting_date ) {
if ( ! empty( $meeting_date ) ) {
$timezone = $meeting_date->getTimezone()->getName();
$current_date = vczapi_dateConverter( 'now', $timezone, false );
@techies23
techies23 / list-meetings-host.php
Created January 18, 2022 07:27
Listing meetings by HOST ID
<?php
/**
* Only show upcoming meetings
*/
?>
<table id="vczapi-show-meetings-list-table" class="vczapi-user-meeting-list">
<thead>
<tr>
<th><?php _e( 'Topic', 'video-conferencing-with-zoom-api' ); ?></th>
<th><?php _e( 'Meeting Status', 'video-conferencing-with-zoom-api' ); ?></th>