Last active
May 5, 2016 15:10
-
-
Save jtsternberg/58dc0a1abe7df36bbc0ad5a1ff9f4faa to your computer and use it in GitHub Desktop.
Remove undesired strings from the google top content list output
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 | |
/** | |
* Remove undesired items from the list output. | |
*/ | |
function modify_gtc_list_output( $output ) { | |
$to_remove = array( | |
' » ', | |
' » ', | |
'» ', | |
'» ', | |
); | |
$output = str_replace( $to_remove, '', $output ); | |
return $output; | |
} | |
add_filter( 'gtc_list_output', 'modify_gtc_list_output' ); | |
add_filter( 'gtc_cached_list_output', 'modify_gtc_list_output' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment