WordPress.org

Codex

User:Here/Texturize

This article is a ROUGH DRAFT. The author is still working on this document, so please do not edit this without the author's permission. The content within this article may not yet be verified or valid. This information is subject to change.

Contents

What is Texturize?

Texturize is a text filter that modifies posted text or comments to present a more readable and visually attractive output.

While it creates aesthetically pleasant text, it might create difficulties when posting, for instance, code examples in a programming language. In such situations modification of the text is not desirable because it might create syntactically incorrect code.

Texturize is enabled by default.

Examples

A few examples (please add more if you know of them):

"quoted text" becomes “quoted text”
'quoted text' becomes ’quoted text’
          --- becomes —
           -- becomes –
          ... becomes …
          (c) becomes ©
          (r) becomes ®
         (tm) becomes ™
           '' becomes ”
           `` becomes “
  president's becomes president’s
  presidents' becomes presidents’
          12' becomes 12′
          12" becomes 12″
          2x4 becomes 2×4

How to work around

Eventually, this will hopefully be an easily accessible option on a per post/comment basis.

Alex King's Unformatted Plugin

Alex King's wp-unformatted plugin "...allows you to add custom fields to a post to disable auto-formatting and/or auto-smart-quote conversion." Untested, but appears to be an applicable solution.

wp-includes/vars.php

...

remove_filter() in myhacks.php

Reference:WordPress Wiki - Plugin/API

Example code:

<?php
remove_filter('comment_text', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
remove_filter('the_content', 'wptexturize');
?>

Alternatives

Other engines? Textile, etc.

Links

texturize web interface.

Forum Threads: