Skip to content

Instantly share code, notes, and snippets.

@digamber89
Created December 28, 2023 15:38
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 digamber89/ab9e6c31cb3558a1359e0418ae7f7659 to your computer and use it in GitHub Desktop.
Save digamber89/ab9e6c31cb3558a1359e0418ae7f7659 to your computer and use it in GitHub Desktop.
Change Meeting Link to go directly to registration page if it exists
<?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