Created
December 28, 2023 15:38
-
-
Save digamber89/ab9e6c31cb3558a1359e0418ae7f7659 to your computer and use it in GitHub Desktop.
Change Meeting Link to go directly to registration page if it exists
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 | |
function cm_vczapi_pro_20231228_change_calendar_link( $props, $meeting_post_id ) { | |
$meeting_details = get_post_meta( $meeting_post_id, '_meeting_zoom_details', true ); | |
if ( ! empty( $meeting_details ) && is_object( $meeting_details ) ) { | |
$props['meetingLink'] = isset($meeting_details->registration_url) ? '<a href="'.$meeting_details->registration_url.'">Register</a>' : $props['meetingLink']; | |
} | |
return $props; | |
} | |
add_filter( 'vczapi-pro-calendar-extended-props', 'cm_vczapi_pro_20231228_change_calendar_link', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment