Linux 软件免费装
Banner图

wpuntexturize

开发者 coffee2code
更新时间 2024年8月9日 02:12
捐献地址: 去捐款
PHP版本: 1.5 及以上
WordPress版本: 6.6
版权: GPLv2 or later
版权网址: 版权信息

标签

post quotes formatting wptexturize substitutions

下载

1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.6.1 1.6.2 1.6.3 1.7 1.7.1 2.0 2.1 2.2 2.2.1 2.2.2 1.0 1.0.1 1.1 1.2 1.3 1.3.1

详情介绍:

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 | Plugin Directory Page | GitHub | Author Homepage

安装:

  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.)

升级注意事项:

2.2.2 Trivial update: noted compatibility through WP 6.6+, removed unit tests from release packaging, and updated copyright date (2024) 2.2.1 Trivial update: noted compatibility through WP 6.3+, updated unit tests to run against latest WordPress, and updated copyright date (2023) 2.2 Minor update: refactored some code, extracted developer docs out from readme and into new DEVELOPER-DOCS.md, restructured unit test files, noted compatibility through WP 5.7, and updated copyright date (2021). 2.1 Recommended update: Mirrored and handled some WP 5.5 terminology changes for inclusion, restructured the unit test file structure, added a TODO.md file, and noted compatibility through WP 5.5+. 2.0 Recommended update: No longer convert native curly quotes to non-curly quotes by default, but added a setting to optionally do so; reorganized much of the plugin's code; removed long-deprecated wpuntexturize(), updated some URLs to HTTPS; and noted compatibility through WP 5.4+. 1.7.1 Trivial update: noted compatibility through WP 5.3+ and updated copyright date (2020) 1.7 Recommended update: now convert native curly quotes to non-curly quotes, remove curly quotes from more places, noted compatibility through WP 5.2+, added CHANGELOG.md, tweaked unit test initialization 1.6.3 Trivial update: aded inline documentation for hooks, noted compatibility through WP 5.1+, updated copyright date (2019) 1.6.2 Trivial update: noted compatibility through WP 4.9+; added README.md; added GitHub link to readme; updated copyright date (2018) 1.6.1 Trivial update: updated unit test bootstrap file, noted compatibility through WP 4.7+, and updated copyright date 1.6 Minor update: convert single and double low 9 quotation marks; noted compatibility through WP 4.6+ 1.5.4 Trivial update: minor unit test tweaks, noted compatibility through WP 4.4+, and updated copyright date 1.5.3 Trivial update: bugfix for very rare usage technique; noted compatibility through WP 4.3+ 1.5.2 Trivial update: noted compatibility through WP 4.1+ and updated copyright date 1.5.1 Trivial update: noted compatibility through WP 4.0+; added plugin icon. 1.5 Minor update: added unit tests; added helper function; noted compatibility through WP 3.8+ and updated copyright date 1.4.4 Trivial update: noted compatibility through WP 3.5+ and updated copyright date 1.4.3 Trivial update: noted compatibility through WP 3.4+; explicitly stated license 1.4.2 Trivial update: noted compatibility through WP 3.3+ 1.4.1 Trivial update: noted compatibility through WP 3.2+ and fixed link in description in readme.txt 1.4 Minor update: deprecated 'wpuntexturize()' in favor of 'c2c_wpuntexturize()'; renamed action from 'wpuntexturize' to 'c2c_wpuntexturize'; added link to plugin homepage in readme.txt 1.3.2 Trivial update: noted compatibility through WP 3.1+ and updated copyright date 1.3.1 Bugfix release. Fixed bugs preventing plugin activation. 1.3 Minor update: renamed a filter; added a filter; wrapped initialization into a function. 1.2 Highlights: now applies to all places in WordPress where quotes are made curly; can now programmatically control what filters are affected; verified WP 3.0 compatibility.

常见问题:

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.

更新日志:

2.2.2 (2024-08-08) 2.2.1 (2023-04-29) 2.2 (2021-07-14) Highlights: This minor release refactors some code, extracts developer docs out from readme and into new DEVELOPER-DOCS.md, restructures unit test files, and notes compatibility through WP 5.7. Details: Full changelog is available in CHANGELOG.md.