Here is a filter I use on UnderwaterFocus to remove the ‘Wiki-‘ prefix from WordPress tags. This snippet hooks the filter_wpsso_tags()
function to the ‘wpsso_tags’ filter, and the function receives an array of tags, which it transforms and returns. You could also use the same technique to add and/or remove certain tags.
1 2 3 4 5 6 7 8 9 10 11 |
add_filter( 'wpsso_tags', 'filter_wpsso_tags', 10, 1 ); function filter_wpsso_tags( $tags = array() ) { foreach ( $tags as $num => $tag_name ) { $tag_name = preg_replace( '/^wiki-/i', '', $tag_name ); $tags[$num] = $tag_name; } return $tags; } |