Created
February 23, 2021 11:08
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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