SmartyPants is a web publishing utility that translates plain ASCII punctuation characters into “smart” typographic punctuation HTML entities. This plugin allows you to conditionally enable SmartyPants for a single post/entry, affecting the the_title
, the_content
, and the the_excerpt
fields by simply adding a custom field named smartypants-on-demand
with a value of 1. Replace 1
with a 0
or simply delete the custom field to use WP’s wptexturize()
instead.
This is a modification of Michel Fortin’s PHP SmartyPants, based on the original Perl version by John Gruber.
Based on version 1.5.1b of PHP SmartyPants.
Why not use SmartyPants all the time? Currently, PHP SmartyPants is significantly slower than WP’s texturize()
by as much as 20% in certain situations. If an entry’s punctuations is handled well by texturize()
, then there is no need to use SmartyPants. But if encounter funny punctuations, try SmartyPants instead.
Download
- rp-smartypants-on-demand–1.0.zip Version 1.01 (December 2, 2004)
- rp-smartypants-on-demand–1.0.zip Version 1.0 (June 15, 2004)
Requirements
- PHP4 (version 4.0.6 or higher)
- GD Library (version 2)
More Information
For now, everything you need to know is the zip file.
- Unzip the package in an empty directory.
- Drop rp-plugin-smartypants-on-demand.php into your wp-content/plugins/ directory, and activate in your Plugins menu.
- To enable SmartyPants for certain post/entry, just add a custom field named
smartypants-on-demand
with a value of 1. - That’s it!