Title: Restrict Partial Content Plugin
Author: Waqas
Published: <strong>2014 年 5 月 16 日</strong>
Last modified: 2016 年 4 月 1 日

---

搜尋外掛

![](https://ps.w.org/restrict-partial-content/assets/banner-772x250.jpg?rev=1384105)

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

![](https://s.w.org/plugins/geopattern-icon/restrict-partial-content_308612.svg)

# Restrict Partial Content Plugin

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

[下載](https://downloads.wordpress.org/plugin/restrict-partial-content.1.3.zip)

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

 [技術支援](https://wordpress.org/support/plugin/restrict-partial-content/)

## 外掛說明

Typical use case would be to restrict access to a portion of the content to users
unless. Restriction can be based on user role (to boost user subscriptions). You
can also setup a timer function to open up content after a certain time.

Options available are:

 1. Restrict access based on the role of user
 2. Restrict access based on specific user id/user name
 3. Restrict access based date/time

See FAQ section for details and examples

## 螢幕擷圖

[⌊Restrict content rule definition⌉⌊Restrict content rule definition⌉[

Restrict content rule definition

[⌊Shortcode with all parameters⌉⌊Shortcode with all parameters⌉[

Shortcode with all parameters

[⌊Shortcode with the rule parameter⌉⌊Shortcode with the rule parameter⌉[

Shortcode with the rule parameter

## 安裝方式

 1. Upload zip archive `restrict-partial-content.zip` to the `/wp-content/plugins/`
    directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 常見問題集

Shortcode to use: [restrict][/restrict]
 All content between the start and end of
the shortcode will be restricted

Shortcode parameters

 1. allow_role => The Role(s) to allow access to the restricted content. This should
    correspond to the WordPress roles. Can take multiple values which are comma separated
 2. allow_user => The User ID(s) OR user login name to allow access to the restricted
    content.
 3. message => The message that is visible when content is restricted
 4. open_time => The exact date and time when the content should become visible (format
    to use YYYY-MM-DD HH:MM:SS example 2016-03-24 13:00:00 will mean that the content
    should show after 24 March 2016 from 1pm onwards)
 5. condition => options are “any” and “all” – “any” will mean that any single parameter
    that matches the criteria will result in the protected content being shown. “all”
    will mean that only when all criteria is matched will the restricted content be
    shown.
 6. rule => Now you can define rules and use these easily. This gives the flexibility
    of changing the criteria in one location and having it apply everywhere that the
    rule has been used. If the rule parameter is used then it will overrule the other
    parameters.

Some examples
 Example 1 [restrict allow_role=”subscriber” allow_user = “1, 2, adam”
open_time=”2016-03-14 11:00:00″ condition=”any” message=”hello”] secret here[/restrict]
This will show the restrcited to all subscribers, users with ID 1 and 2, username“
adam”. As soon as the open_time is passed it will show the restricted content to
everyone.

Example 2
 [restrict allow_role=”author” open_time=”2016-03-14 11:00:00″ condition
=”all” message=”hello”] secret here[/restrict] This will show only when the user
is logged in with a subscriber role and the open_time has passed

Example 3
 [restrict rule=”2″] secret here[/restrict] This will apply rule with 
id 2. Rules can be defined from inside the WP dashboard.

## 使用者評論

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

## 參與者及開發者

以下人員參與了開源軟體〈Restrict Partial Content Plugin〉的開發相關工作。

參與者

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

[將〈Restrict Partial Content Plugin〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/restrict-partial-content)

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

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

## 變更記錄

#### 1.3

Now allows rules to be created and applied

#### 1.2

Added parameter “condition” for greater flexibility in controlling when the criteria
matches
 Allow_user now accepts user id OR usernames Also small fixes suggested 
by “hostz-frank”

#### 1.1

Small fixes to styling

#### 1.0

Added option to restrict content based on role and timeouts

#### 0.1

Initial launch

## 中繼資料

 *  版本 **1.3**
 *  最後更新 **10 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 3.9.1 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.4.34**
 *  語言
 * [English (US)](https://wordpress.org/plugins/restrict-partial-content/)
 *  [進階檢視](https://tw.wordpress.org/plugins/restrict-partial-content/advanced/)

## 評分

 4 星，滿分為 5 星

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

[撰寫評分](https://wordpress.org/support/plugin/restrict-partial-content/reviews/#new-post)

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

## 參與者

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

## 技術支援

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

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