Skip to content

Commit 20f786a

Browse files
authored
Merge pull request #128 from Vrishabhsk/feature/VJ-52-target-blank-dev
Fix : Future Proof
2 parents 1902575 + 2eea4c3 commit 20f786a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)