I have a little PHP script that uses get_the_ID() and then scrubs it to create a button that points to a category page on a WP site. The issue is that after a couple months of this working fine, a mysterious colon has showed up. I can seem to find in WP documentation what has changes and why this colon is now being printed to the page.
The code generating this is as follows:
<?php
$simpleCats= tribe_get_event_categories(
get_the_ID(), array(
'before' => '',
'sep' => '',
'after' => '',
'label' => '',
'label_before' => '',
'label_after' => '',
'wrap_before' => '<div class="avia-button-wrap avia-button-left eventCatBtn">',
'wrap_after' => '</div>'
)
);
$simpleCats= preg_replace("/events\/category\//", "", $simpleCats);
echo $simpleCats;
?>
Any ideas why this colon is being printed?