Title: WP ragadjust
Author: James Koster
Published: <strong>2014 年 1 月 3 日</strong>
Last modified: 2014 年 9 月 4 日

---

搜尋外掛

![](https://ps.w.org/wp-ragadjust/assets/banner-772x250.jpg?rev=832463)

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

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

# WP ragadjust

 由 [James Koster](https://profiles.wordpress.org/jameskoster/) 開發

[下載](https://downloads.wordpress.org/plugin/wp-ragadjust.1.0.0.zip)

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

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

## 外掛說明

WP ragadjust is an extremely simple plugin that includes ragadjust.js on your web
pages. Ragadjust.js is a script written by @nathanford and envisaged by @markboulton
which resolves several typographical violations relating to the rag that are common
on the web:

 * Line breaks immediately following a preposition
 * Line breaks immediately following a dash
 * Small words at the end of a line
 * Consecutive hyphenation
 * (Line) broken, short emphasised phrases

Solving these issues improves the overall readability of your content.

[Read the article behind the idea](http://24ways.org/2013/run-ragged/).

## 螢幕擷圖

 * [[
 * Before / After ragadjust.

## 安裝方式

 1. Upload `wp-ragadjust` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Done!

## 常見問題集

  Which elements are _ragadjust_ed by default?

By default ragajust is applied to `p` tags.

  Can I change which elemnts are adjusted?

Yes, you can use the `wpr_elements` filter to make adjustments to the selectors.

To add a new selector:

    ```
    add_filter( 'wpr_elements', 'wpr_new_selectors' );
    function wpr_new_selectors( $elements ) {
        $elements[] .= '.textwidget'; // Adjust text widgets in addition to p
        return $elements;
    }
    ```

To remove a current selector:

    ```
    add_filter( 'wpr_elements', 'wpr_remove_elements' );
    function wpr_remove_elements( $elements ) {
        unset( $elements['0'] ); // Unset 'p'.
        return $elements;
    }
    ```

To use your own, entirely unique selectors:

    ```
    add_filter( 'wpr_elements', 'wpr_custom_elements' );
    function wpr_custom_elements( $elements ) {
        $elements = array(
                'article',
                'footer',
            );
        return $elements;
    }
    ```

These snippets should go in your [child themes](https://codex.wordpress.org/Child_Themes)
functions.php file.

  Can I change the method used?

Yes. By default all methods will be used to fix all violations. If however you only
want to fix prepositions and ignore everything else you can do so via the `wpr_method`
filter like so:

    ```
    add_filter( 'wpr_method', 'wpr_custom_method' );
    function wpr_custom_method( $method ) {
        $method = 'prepositions';
        return $method;
    }
    ```

The method options are:

 * _emphasis_ – Text of three or less words in bold or italics does not break across
   lines.
 * _small-words_ – Breaks lines before words of three or less characters.
 * _prepositions_ – Breaks lines before prepositions.
 * _dashes_ – Breaks lines before hyphens and dashes.
 * _all_ (default) – All of the above.

## 使用者評論

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

### 󠀁[It works](https://wordpress.org/support/topic/it-works-881/)󠁿

 [Curtis](https://profiles.wordpress.org/salsafire/) 2016 年 9 月 3 日

Makes pages more readable. 🙂

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

### 󠀁[Usefull](https://wordpress.org/support/topic/usefull-66/)󠁿

 [Mahesh Ruparel](https://profiles.wordpress.org/maheshruparel/) 2017 年 2 月 8 
日

Simple but really usefull

 [ 閱讀全部 5 則使用者評論 ](https://wordpress.org/support/plugin/wp-ragadjust/reviews/)

## 參與者及開發者

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

參與者

 *   [ James Koster ](https://profiles.wordpress.org/jameskoster/)

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

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

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

## 變更記錄

#### 1.0.0

Initial release.

## 中繼資料

 *  版本 **1.0.0**
 *  最後更新 **12 年前**
 *  啟用安裝數 **20+**
 *  WordPress 版本需求 ** 3.3 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.0.38**
 *  語言
 * [English (US)](https://wordpress.org/plugins/wp-ragadjust/)
 * 標籤:
 * [hyphenation](https://tw.wordpress.org/plugins/tags/hyphenation/)[rag](https://tw.wordpress.org/plugins/tags/rag/)
   [typography](https://tw.wordpress.org/plugins/tags/typography/)
 *  [進階檢視](https://tw.wordpress.org/plugins/wp-ragadjust/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  5 個 5 星使用者評論     ](https://wordpress.org/support/plugin/wp-ragadjust/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/wp-ragadjust/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/wp-ragadjust/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/wp-ragadjust/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/wp-ragadjust/reviews/?filter=1)

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

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

## 參與者

 *   [ James Koster ](https://profiles.wordpress.org/jameskoster/)

## 技術支援

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

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