Skip to content

Commit 674f18e

Browse files
committed
Verify EM plugin is active using fn_exists check
1 parent 76a69dd commit 674f18e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

themes/osi/inc/template-functions.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ function osi_the_page_dates() {
229229
* @return string The processed content.
230230
*/
231231
function osi_force_content_links_new_tab( string $content ) {
232-
if ( ! em_is_event_rsvpable() ) {
232+
// Ensure Events Manager plugin is active and functionality for RSVPable events exists.
233+
if ( function_exists( 'em_is_event_rsvpable' ) && ! em_is_event_rsvpable() ) {
233234
// Instantiate the processor.
234235
$processor = new \WP_HTML_Tag_Processor( $content );
235236

@@ -252,7 +253,7 @@ function osi_force_content_links_new_tab( string $content ) {
252253
}
253254
}
254255

255-
return $processor->get_updated_html();
256+
$content = $processor->get_updated_html();
256257
}
257258

258259
return $content;

0 commit comments

Comments
 (0)