Title: Remove CapsLock
Author: Erik
Published: <strong>2021 年 9 月 6 日</strong>
Last modified: 2021 年 9 月 10 日

---

搜尋外掛

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

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

# Remove CapsLock

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

[下載](https://downloads.wordpress.org/plugin/remove-capslock.0.1.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/remove-capslock/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/remove-capslock/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/remove-capslock/#developers)

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

## 外掛說明

This plugin automatically filters titles, content and comments, searching and normalizing
uppercase text.
 You can customize the minimum amount of consecutive characters 
for each type of content (title, content, comments) before trigger the normalization
function on that string. This plugin is intended to change on-the-fly what is displayed
without affecting what is stored in the wordpress database! If you want to change
permanently the website content/titles you need to modify posts. Please before install,
be sure there isn’t any CSS rule that force uppercase otherwise the font case will
be css driven and this plugin consequently useless. Check the troubleshooting section
for guidance on this if the plugin seems not to work.

### Setup

After installation, the plugin automatically displays normalised texts. So the title,
post content, widget titles and comments will be filtered and normalised by default.

You can customize/add/remove filters adding to functions.php the name of the hook
and the number of allowed consecutive uppercase characters.

1) To **create your own set** of hook+rule

    ```
    add_action( 'init', function() {
        add_filter( 'rcl_hook_filters', function () { return array(
            array( 'hook' => 'the_title', 'allowed_chars' => 6 ), // title
            array( 'hook' => 'comment_text', 'allowed_chars' => 5 ), // comments
            array( 'hook' => 'widget_title', 'allowed_chars' => 6 ), // widget
            );
        } );
    } );
    ```

2) To **edit a single filter** value (it doesn’t create any new filter, only change
an already created one). In order to disable a filter, while continue to use the
rest of the standard set, you need to set “-1” as value (example below).

    ```
    add_filter( 'rcl_the_title', function () { return 60; } );
    add_filter( 'rcl_comment_text', function () { return 3; } );
    add_filter( 'rcl_widget_title', function () { return -1; } ); // disabled
    ```

One last note, since the main post/page content has a different content type (isn’t
a string) **you need to set the filter for the post content as below**.

    ```
    add_filter( 'rcl_the_content', function () { return 10; } );
    // OR to disable the content filter
    // add_filter( 'rcl_the_content', function () { return -1; } );
    ```

If you need to change the default setup and enable uppercase text correction ONLY
for comments, you need to add to functions.php the filter as below:

    ```
    // functions.php
    add_filter( 'rcl_the_content', function () { return -1; } ); // disabled
    add_action( 'init', function() {
        add_filter( 'rcl_hook_filters', function () { return array(
            array( 'hook' => 'comment_text', 'allowed_chars' => 5 ), // 2 or more uppercase digits triggers the text normalization
            );
        } );
    } );
    ```

### Troubleshooting

This plugin is not intended to change the css style of your website, because you
can do this easily with customizer and without any plugin.
 So before installing
this plugin I suggest you try to reset the style of the title/content/widget, using
the property `text-transform: inherit !important;`

### copyright

Remove CapsLock, Copyright 2021 Codekraft Studio
 Remove CapsLock is distributed
under the terms of the GNU GPL

This program is free software: you can redistribute it and/or modify
 it under the
terms of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
 but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. See the LICENSE file for more details.

## 使用者評論

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

## 參與者及開發者

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

參與者

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

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

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

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

## 變更記錄

#### 0.1.0

 * add filters to provide some plugin customizations

#### 0.0.1

 * just for a joke I made this plugin but it might be useful to you too

## 中繼資料

 *  版本 **0.1.0**
 *  最後更新 **5 年前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **5.8.13**
 *  PHP 版本需求 ** 5.6 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/remove-capslock/)
 * 標籤:
 * [capslock](https://tw.wordpress.org/plugins/tags/capslock/)[lowercase](https://tw.wordpress.org/plugins/tags/lowercase/)
   [text](https://tw.wordpress.org/plugins/tags/text/)[uppercase](https://tw.wordpress.org/plugins/tags/uppercase/)
 *  [進階檢視](https://tw.wordpress.org/plugins/remove-capslock/advanced/)

## 評分

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

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

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

## 參與者

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

## 技術支援

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

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