Title: Cleanup Text
Author: roggie
Published: <strong>2010 年 5 月 8 日</strong>
Last modified: 2010 年 8 月 12 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/cleanup-text.svg)

# Cleanup Text

 由 [roggie](https://profiles.wordpress.org/roggie/) 開發

[下載](https://downloads.wordpress.org/plugin/cleanup-text.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/cleanup-text/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/cleanup-text/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/cleanup-text/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/cleanup-text/#developers)

 [技術支援](https://wordpress.org/support/plugin/cleanup-text/)

## 外掛說明

WordPress posts and pages can contain Smart quotes and other fancy characters. But
Smartquotes and other special characters don’t work properly if you send the contents
of a post by email. This plugin cleans up text so it can be emailed properly.

Instead of using this plugin you could use WordPress filters to reformat text, but
WordPress filters cannot be used with PHP functions like strip_tags. If you use 
a filter to remove Smart quotes you can’t also use strip_tags to remove HTML.

Also, WordPress filters don’t remove all the characters that could cause problems.
For example, double spaces are not removed properly by WordPress, and Europeans 
will have problems with the UK pound currency symbol.

This very simple plugin removes all sorts of special characters, including double
spaces and currency symbols that WordPress filters don’t manage.

It also has an option to remove HTML.

## 安裝方式

1) Copy the file cleanup_text.php to your WordPress plugins directory.

2) Login to WordPress as an administrator, go to Plugins and Activate it.

3) Call the plugin anywhere in your theme or other PHP code.

E.g. replace “the_content()” with “cleanup_text( the_content() )”

## 常見問題集

**How do I use the plugin?**
 Call the function cleanup_text() from within your 
theme or other plugin. Supply the text to be cleaned as the first argument. E.g.`
<?php $clean_text = cleanup_text( $text_to_clean ) ; ?>`

**How do I get the plugin to remove HTML?**
 Call the function with TRUE as the 
second argument. E.g. `<?php $clean_text = cleanup_text( $text_to_clean, TRUE) ;?
>`

**Can I use cleanup_text for web pages?**
 Yes, you could use cleanup_text to clean
text that will be displayed on a web page. You would probably use something like:
E.g. `<?php echo cleanup_text( get_the_content() ) ; ?>`

But the results will probably not be what you want because cleanup_text uses “\n”
for new lines, and web pages use `<br />` or some other HTML notation.

If you really want to do this let me know and I’ll update the plugin so it can be
used in this way.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Cleanup Text〉的開發相關工作。

參與者

 *   [ roggie ](https://profiles.wordpress.org/roggie/)

[將〈Cleanup Text〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/cleanup-text)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/cleanup-text/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/cleanup-text/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/cleanup-text/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/cleanup-text/)。

## 變更記錄

For changelog please visit http://www.thehypervisor.com/cleanup-text/

## 中繼資料

 *  版本 **2.0.1**
 *  最後更新 **16 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 1.0.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.0.0**
 *  語言
 * [English (US)](https://wordpress.org/plugins/cleanup-text/)
 * 標籤:
 * [filter](https://tw.wordpress.org/plugins/tags/filter/)[html](https://tw.wordpress.org/plugins/tags/html/)
   [Smart Quotes](https://tw.wordpress.org/plugins/tags/smart-quotes/)[special characters](https://tw.wordpress.org/plugins/tags/special-characters/)
 *  [進階檢視](https://tw.wordpress.org/plugins/cleanup-text/advanced/)

## 評分

這個項目尚無任何評論記錄。

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

[查看全部使用者評論](https://wordpress.org/support/plugin/cleanup-text/reviews/)

## 參與者

 *   [ roggie ](https://profiles.wordpress.org/roggie/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/cleanup-text/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://www.rogerh.com/donate.html)