add_filter('wp_list_categories', 'myCatNoBrk', 10, 1);
function myCatNoBrk($OrgCat) {
$CatNoBrk = preg_replace('/<br \/>/',',',$OrgCat);
return $CatNoBrk;
}
Hello, this is part of a wordpress function that would replace html breaks with commas. How could I alter this to also remove and add 'x' around each element?
in other words: The output code is something like
<a href="xxx">cat1</a><br>
<a href="xxx2">cat2</a><br>
and so on
I'd like to change this to show only ('cat1','cat2') for an array definition
example output:
<?php $grades_array = array('a+','a','a-','b+','b','b-','c+');?>