5 Cze 2008

Mój pierwszy plugin do wordpress

<a rel="nofollow" href='http://kody.wig.pl' class='tag-link-42' title='1 topics' rel="tag">Kody</a>
<?php 

function title_add_tag($text) {
  $text = preg_replace("/title='[^']*'/i", '', $text);
  return preg_replace('/>([^<]*)<\/a>/i', " title='$1'>$1</a>",  $text); 
}
add_filter('wp_tag_cloud', title_add_tag');
?>