Created
February 22, 2016 20:35
-
-
Save niconerd-zz/02386b3e0bd9a130ef06 to your computer and use it in GitHub Desktop.
The Events Calendar - Modify json+ld data before it gets printed
This file contains 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
<?php | |
/* | |
* The Events Calendar - Modify json+ld data before it gets printed | |
*/ | |
add_filter( 'tribe_google_data_markup_json', 'tribe_fix_google_data', 100, 1 ); | |
function tribe_fix_google_data ( $data ) { | |
$data = str_replace('</br>' ,'', $data); // replaces </br> | |
$data = str_replace('<br/>' ,'', $data); // replaces <br/> | |
$data = str_replace('<br>' ,'', $data); // replaces <br> | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment