<?php
/*
Plugin Name: wp_coders
Plugin URI: http://simplesideias.com.br/wp-coders
Description: Removes WP annoyances (quotes and dashes)
Author: Nando Vieira
Version: 1.0
Author URI: http://simplesideias.com.br
*/
 
class wp_coders
{
    function 
wp_coders()
    {
        
add_filter('comment_author', array(&$this'normalize'), 20);
        
add_filter('comment_text', array(&$this'normalize'), 20);
        
add_filter('bloginfo', array(&$this'normalize'), 20);
        
add_filter('category_description', array(&$this'normalize'), 20);
        
add_filter('list_cats', array(&$this'normalize'), 20);
        
add_filter('the_content', array(&$this'normalize'), 20);
        
add_filter('the_excerpt', array(&$this'normalize'), 20);
        
add_filter('single_post_title', array(&$this'normalize'), 20);
        
add_filter('the_title', array(&$this'normalize'), 20);
    }
 
    function 
normalize($text '')
    {
        
$text str_replace(
            array(
'&#8212;'' &#8212; ''&#8211;'),
            array(
'---'' --- ''--'),
            
$text
        
);
        
        
$text str_replace(array("&#8216;""&#8217;""&#8242;"), "&#039;"$text);
        
$text str_replace(array("&#8220;""&#8221;""&#8243;"), "&#034;"$text);
        
        return 
$text;
    }
}
 
$wp_coders =& new wp_coders();
?>