Skip to content

Instantly share code, notes, and snippets.

@techies23
Created February 23, 2021 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techies23/b54b16e5c3d81231f64d117dff03f51e to your computer and use it in GitHub Desktop.
Save techies23/b54b16e5c3d81231f64d117dff03f51e to your computer and use it in GitHub Desktop.
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
*/
global $zoom;
if ( ! empty( $zoom ) ) {
$meeting_id = $zoom['api']->id;
?>
<div class="dpn-zvc-sidebar-box">
<div class="register-links">
<?php if ( ! empty( $zoom['registration_details'] ) && ! empty( $zoom['registration_details'][ $meeting_id ] ) && ! empty( $zoom['registration_details'][ $meeting_id ]->registrant_id ) ) { ?>
<a href="<?php echo esc_url( $zoom['registration_details'][ $meeting_id ]->join_url ); ?>" target="_blank" class="btn btn-register-btn-link"><?php _e( 'Join Meeting', 'vczapi-pro' ); ?></a>
<?php if ( ! empty( $zoom['api']->start_url ) && vczapi_check_author( $post_id ) ) { ?>
<a target="_blank" href="<?php echo esc_url( $zoom['api']->start_url ); ?>" class="btn btn-start-link"><?php _e( 'Start Meeting', 'vczapi-pro' ); ?></a>
<?php }
} else {
if ( ! is_user_logged_in() ) {
?>
<p><?php _e( 'Already registered ? Please check your email for the join links.', 'vczapi-pro' ); ?></p>
<?php } ?>
<?php if ( ! empty( $zoom['api']->registration_url ) ) { ?>
<a rel="nofollow" href="<?php echo esc_url( $zoom['api']->registration_url ); ?>" class="btn btn-register-btn-link"><?php _e( 'Register Now', 'vczapi-pro' ); ?></a>
<?php } ?>
<?php } ?>
</div>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment