Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Un-en-dash the Double Dash
- */
- add_filter( 'the_content' , 'mh_un_en_dash' , 50 );
- add_filter( 'the_title', 'mh_un_en_dash' , 50 );
- add_filter( 'the_content', 'mh_un_en_dash' , 50 );
- add_filter( 'the_excerpt', 'mh_un_en_dash' , 50 );
- add_filter( 'comment_text', 'mh_un_en_dash' , 50 );
- add_filter( 'list_cats', 'mh_un_en_dash' , 50 );
- function mh_un_en_dash( $text ) {
- $content = str_replace( '–' , '--' , $text );
- return $text;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement