Smart quote fix

This is a test of my smart-quote fix.

There’s an apostrophe in this sentence.

“This sentence is surrounded by double quotes.”

‘This sentence is surrounded by single quotes.’

Here’s how I fixed it:

Create a file in wp-content/plugins called my-hacks.php. Put the following in the file:

<?php
/*
Plugin Name: my-hacks
Plugin URI: #
Description: Resting place for a variety of changes. Presently includes removing
the wptexturize filter from comment_text, the_excerpt and the_content
Version: 0.1
Author:
Author URI:
*/
remove_filter('comment_text', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
remove_filter('the_content', 'wptexturize');
?>

Now, log in to WordPress and choose Plugins. Activate my-hacks. That’s it!

Credits:

  • Share/Bookmark

Comments

5 Responses to “Smart quote fix”

  1. no1son on June 17th, 2004 10.06

    no problem. :)

  2. SuperDeluxo4.2 wgets and cURLs on June 17th, 2004 10.08

    Getting rid of smart quotes in WordPress
    Thanks a ton to Matt (one of the developers of WordPress) for patiently showing me how to get rid of smart quotes in this blog. Smart quotes are all well and good and pretty, but they invalidated any text intended for the command-line. If anybody els…

  3. OmegaMan on May 31st, 2007 11.26

    Its great that Matt showed you how to do it, but why did Matt not make it a simple check box, turn off smart quotes on the admin page? That would allow one to specify the character set…why not these items? Thanks for this blog post. My blog is 90% code snippets and that smart quote for the user is damaging on copy and paste….

  4. OmegaMan on May 31st, 2007 11.41

    It appears that the latest version of Wordpress no longer uses filters you mentioned and smart quotes are still outputted…check your own text. :-(

  5. Katja on May 31st, 2007 15.24

    Yeah – the smart quote hack was something I did several years (and revs of WP) ago.

Leave a Reply




CommentLuv Enabled