Title: wpuntexturize
Author: Scott Reilly
Published: <strong>2009 年 5 月 28 日</strong>
Last modified: 2025 年 4 月 8 日

---

搜索插件

![](https://ps.w.org/wpuntexturize/assets/banner-772x250.png?rev=552726)

![](https://ps.w.org/wpuntexturize/assets/icon-128x128.png?rev=972885)

# wpuntexturize

 作者：[Scott Reilly](https://profiles.wordpress.org/coffee2code/)

[下载](https://downloads.wordpress.org/plugin/wpuntexturize.2.3.zip)

 * [详情](https://cn.wordpress.org/plugins/wpuntexturize/#description)
 * [评价](https://cn.wordpress.org/plugins/wpuntexturize/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wpuntexturize/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wpuntexturize/#developers)

 [支持](https://wordpress.org/support/plugin/wpuntexturize/)

## 描述

By default, WordPress converts single and double quotation marks into their curly
alternatives. This plugin prevents that from happening, so you can enjoy your quotation
marks in their non-curly glory. If your content happens to already have curly quotation
marks in it, then this plugin can optionally also convert them to their non-curly
alternatives.

_Note:_ Despite the unfortunately misleading name, this plugin is NOT the antithesis
of WordPress’s `wptexturize()` function. This ONLY prevents WordPress from making
HTML entity code substitutions of single and double quotation marks with their curly
alternatives and does NOT prevent `wptexturize()` from making any other character
and string substitutions. See the FAQ for details on the filters processed by the
plugin.

Links: [Plugin Homepage](https://coffee2code.com/wp-plugins/wpuntexturize/) | [Plugin Directory Page](https://wordpress.org/plugins/wpuntexturize/)
| [GitHub](https://github.com/coffee2code/wpuntexturize/) | [Author Homepage](https://coffee2code.com)

### Developer Documentation

Developer documentation can be found in [DEVELOPER-DOCS.md](https://github.com/coffee2code/wpuntexturize/blob/master/DEVELOPER-DOCS.md).
That documentation covers the numerous hooks provided by the plugin. Those hooks
are listed below to provide an overview of what’s available.

 * `c2c_wpuntexturize` : An alternative approach to safely invoke `c2c_wpuntexturize()`
   in such a way that if the plugin were deactivated or deleted, then your calls
   to the function won’t cause errors in your site. This only applies if you use
   the function directly, which is not typical usage for most users.
 * `wpuntexturize_filters` : customize what filters to hook to be filtered with 
   wpuntexturize. See the Description section for a complete list of all filters
   that are filtered by default.
 * `c2c_wpuntexturize_replacements` : Customize the character replacements handled
   by the plugin.
 * `c2c_wpuntexturize_convert_curly_quotes` : Enable conversion of preexisting curly
   quotes into their non-curly alternatives.

## 屏幕截图

 * [[
 * A screenshot of the plugin’s checkbox on the Settings -> Reading admin page. 
   If checked, the plugin will convert existing curly quotation marks into their
   non-curly alternatives.

## 安装

 1. Install via the built-in WordPress plugin installer. Or download and unzip `wpuntexturize.
    zip` inside the plugins directory for your site (typically `wp-content/plugins/`)
 2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
 3. Optional: If you want to also convert existing curly quotation marks within posts
    to their non-curly alternatives, then on the Settings -> Reading admin page check
    the checkbox labeled “Convert existing curly quotes in posts to their non-curly
    alternatives”. _(Reminder that the plugin will always prevent WordPress from converting
    non-curly quotation marks to the curly alternatives.)_

## 常见问题

### Why are certain characters in my posts still being replaced by their HTML entity encoded version?

This ONLY prevents WordPress from making HTML entity code substitutions of single
and double quotation marks with their curly alternatives and does NOT prevent WordPress
from making any other character and string substitutions.

### Why do I still see curly quotation marks in my posts?

Most likely these curly quotes are actually present in your originally post content
and are being directly shown to visitors. WordPress isn’t converting these to curly
quotes since they are already that way. This could happen if you copy-and-pasted
text from another source.

If you don’t want any curly quotes to appear in your posts at all, then on the Settings-
> Reading admin page check the checkbox labeled “Prevent all curly quotes?”. (Or
if you’re a developer, look into use of the `c2c_wpuntexturize_convert_curly_quotes`
filter.)

### What text does this plugin modify/filter?

This plugin potentially modifies the post content, excerpt, title, comment text,
widget text, and more.

More specifically, it performs a wpuntexturize on every filter that WordPress applies
the wptexturize to by default. This list comprises:

comment_author, term_name, link_name, link_description, link_notes, bloginfo, wp_title,
widget_title, single_post_title, single_cat_title, single_tag_title, single_month_title,
nav_menu_attr_title, nav_menu_description, term_description, get_the_post_type_description,
the_post_thumbnail_caption, the_title, the_content, the_excerpt, the_excerpt_embed,
comment_text, list_cats, widget_text, widget_text_content

This complete list can be filtered via wpuntexturize’s own filter, `wpuntexturize_filters`.

### Does this plugin include unit tests?

Yes. The tests are not packaged in the release .zip file or included in plugins.
svn.wordpress.org, but can be found in the [plugin’s GitHub repository](https://github.com/coffee2code/wpuntexturize/).

## 评价

![](https://secure.gravatar.com/avatar/2de2b58712d60f075b804e6819a15827e29131ca7167b8dc0b2a359f3f5abf7c?
s=60&d=retro&r=g)

### 󠀁[Exactly what I needed](https://wordpress.org/support/topic/exactly-what-i-needed-972/)󠁿

 [klingonteacher](https://profiles.wordpress.org/klingonteacher/) 2024 年 9 月 27
日

This plugin does exactly what I want, and it still works with any updated of WP 
I do. FYI: I needed this plugin because I write many texts in Klingon. Those use
the apostrophe as a letter very often, and it looks really strange if they are converted
to left and right curly quotes. Here’s an an example: So’wI’ vIchu’Ha’be’ ‘e’ vI’Ir.
PS: Just a ssuggestion, but if you need an idea for improvement, add the option 
to what is converted to what. For instance, I would enjoy having all apostrophes[‘]
converted only to “Right single quotation mark”, but not to left curly quote. Just
an idea.

![](https://secure.gravatar.com/avatar/68a125e57a53bb288acbe612d6e8d3cde4f5c6b6e0b19aa1b604e7410f90b19e?
s=60&d=retro&r=g)

### 󠀁[thx](https://wordpress.org/support/topic/thx-111/)󠁿

 [pumptechbmw](https://profiles.wordpress.org/pumptechbmw/) 2024 年 4 月 30 日

working!

![](https://secure.gravatar.com/avatar/20321f1bf75f0290075e0df0425109b0e3bb4bfd586fdd12c148a13d369f5a7c?
s=60&d=retro&r=g)

### 󠀁[***RESOVLED*** Straightens quotes I don’t want straight](https://wordpress.org/support/topic/straightens-quotes-i-dont-want-straight/)󠁿

 [clarenceinwonderland](https://profiles.wordpress.org/clarenceinwonderland/) 2020
年 5 月 16 日 2 回复

This issue was very quickly resolved by the developer. I’m very impressed by the
quick response and the plugin works great. Upped to 5-stars. — When I type straight
quotes in a post, this plugin does keep them straight, which is nice. However, when
I type in curly quotes in a post, this plugin straightens them, which is not nice.
In my work, a curly quote and a straight quote are semantically different, and must
display as such. I would just like to have displayed what I type.

![](https://secure.gravatar.com/avatar/21a08623cc4ef947a560ced35c1b72638da70f982c5169c8aba591be974ecd2b?
s=60&d=retro&r=g)

### 󠀁[actual curly-quotes get flattened](https://wordpress.org/support/topic/does-the-job-672/)󠁿

 [squeegily](https://profiles.wordpress.org/squeegily/) 2020 年 3 月 31 日 1 回复

Since v1.7 (2019-05-28), this plugin flattens out curly-quotes that I intentionally
typed. This behaviour cannot be disabled from the UI—it can only be “configured”
by way of writing a separate ad-hoc plugin. Hopefully, this gets fixed in the next
release. I had hoped to get a plugin that would just leave my quotes alone / as 
I type them…

![](https://secure.gravatar.com/avatar/5279469e2902e7e8465ebd703573d02536fe30e5f6d0ac3e87f74f9ec148e13a?
s=60&d=retro&r=g)

### 󠀁[Works great](https://wordpress.org/support/topic/works-great-6453/)󠁿

 [Siili](https://profiles.wordpress.org/kbtjakbt/) 2020 年 2 月 3 日

Thank you for this plugin Scott

![](https://secure.gravatar.com/avatar/798fff42195a4a182350e90ccd86e49f5fb1b95cf687856c3ae98dd3d0a7d8c6?
s=60&d=retro&r=g)

### 󠀁[Works great and as advertised.](https://wordpress.org/support/topic/works-great-and-as-advertised/)󠁿

 [touchdowntech](https://profiles.wordpress.org/touchdowntech/) 2019 年 3 月 26 
日

This plugin works great! I only wish that it would also handle quotation marks in
WooCommerce variable product descriptions.

 [ 阅读所有12条评价 ](https://wordpress.org/support/plugin/wpuntexturize/reviews/)

## 贡献者及开发者

「wpuntexturize」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

「wpuntexturize」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/wpuntexturize/contributors)
为本插件所做的贡献。

[帮助将「wpuntexturize」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wpuntexturize)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wpuntexturize/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/wpuntexturize/)，或通过[RSS](https://plugins.trac.wordpress.org/log/wpuntexturize/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wpuntexturize/)。

## 更新日志

#### 2.3 (2025-04-07)

Highlights:

This recommended release drops support for versions of WP older than 5.5, prevents
translations from including unintended markup, verifies compatibility through WP
6.8+ and PHP 8.3+, and a few more minor changes.

Details:

 * Change: Remove code supporting versions of WP older than 5.5
 * Change: Escape output of all translated strings
 * Change: Discontinue explicit and unnecessary loading of textdomain
 * Change: Remove `is_wp_55_or_later()`
 * Change: Sanitize the plugin’s setting value
 * New: Add `sanitize_boolean()`
 * Change: Note compatibility through WP 6.8+
 * Change: Drop compatiblity with versions of WP older than 5.5
 * Change: Confirm compatiblity through PHP 8.3+
 * Change: Shorten plugin description in plugin header and readme.txt
 * Fix: Fix typo in ‘Author URI’ plugin header value
 * Change: Update copyright date (2025)
 * Unit tests:
    - Change: Explicitly define return type for overridden method
    - Change: Delete tests for removed back-compatibility

#### 2.2.2 (2024-08-08)

 * Change: Note compatibility through WP 6.6+
 * Change: Update copyright date (2024)
 * Change: Reduce number of ‘Tags’ in readme.txt
 * Change: Remove development and testing related files from release packaging
 * Unit tests:
    - Hardening: Prevent direct web access to `bootstrap.php`
    - Change: In bootstrap, store path to plugin file constant
    - Change: In bootstrap, add backcompat for PHPUnit pre-v6.0

#### 2.2.1 (2023-04-29)

 * Change: Note compatibility through WP 6.3+
 * Change: Update copyright date (2023)
 * Change: Add link to DEVELOPER-DOCS.md in README.md
 * New: Add `.gitignore` file
 * Unit tests:
    - Fix: Allow tests to run against current versions of WordPress
    - New: Add `composer.json` for PHPUnit Polyfill dependency
    - Change: Prevent PHP warnings due to missing core-related generated files

_Full changelog is available in [CHANGELOG.md](https://github.com/coffee2code/wpuntexturize/blob/master/CHANGELOG.md)._

## 额外信息

 *  版本 **2.3**
 *  最后更新：**1 年前**
 *  活跃安装数量 **800+**
 *  WordPress 版本 ** 5.5 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  语言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/wpuntexturize/) 和 [English (US)](https://wordpress.org/plugins/wpuntexturize/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/wpuntexturize)
 * 标签
 * [formatting](https://cn.wordpress.org/plugins/tags/formatting/)[post](https://cn.wordpress.org/plugins/tags/post/)
   [quotes](https://cn.wordpress.org/plugins/tags/quotes/)[wptexturize](https://cn.wordpress.org/plugins/tags/wptexturize/)
 *  [高级视图](https://cn.wordpress.org/plugins/wpuntexturize/advanced/)

## 评级

 4.6 星（最高 5 星）。

 *  [  10 条 5 星评价     ](https://wordpress.org/support/plugin/wpuntexturize/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/wpuntexturize/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wpuntexturize/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wpuntexturize/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/wpuntexturize/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wpuntexturize/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wpuntexturize/reviews/)

## 贡献者

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wpuntexturize/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ARCFJ9TX3522)