Created
October 19, 2020 11:24
-
-
Save digamber89/e03a6019490eae763fc915e1c6ccec7b to your computer and use it in GitHub Desktop.
Add Custom Data to popoover
This file contains hidden or 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
/** | |
* Add PDF Link to Calendar Popover | |
*/ | |
add_filter( 'vczapi-pro-calendar-extended-props', 'codemanas_add_calendar_additional_fields', 10, 2 ); | |
function codemanas_add_calendar_additional_fields( $extendedProps, $meeting_id ) { | |
$pdf_link = get_post_meta( $meeting_id, 'vczapi_meeting_pdf_link', true ); | |
$pdf_html = ! empty( $pdf_link ) ? '<div class="pdf-link"><a href="' . $pdf_link . '" target="_blank" rel="nofollow noopener">Things to read before the meeting</a></div>' : ''; | |
$extendedProps['meetingPDFLink'] = $pdf_html; | |
return $extendedProps; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment