[WordPress] 外掛分享: Login Require Press

首頁外掛目錄 › Login Require Press
100+
安裝啟用
★★★★
4.5/5 分(4 則評價)
2304 天前
最後更新
問題解決
WordPress 3.8.1+ v1.4.0 上架:2015-02-05

內容簡介

概觀:

截至本文撰寫時,最新版本的 WordPress 5.3 具有三個文章可見性選項:「公開」、「受密碼保護」和「私人」。

「受密碼保護」選項允許站點管理員單獨鎖定某些文章,即使對已登錄的用戶也要使用額外的密碼 / 密碼。但是,目前沒有內置的方法僅拒絕未經身份驗證的用戶訪問。

「Login Require Press」是一個 WordPress 插件,允許站點管理員專門將任何公共文章類型的任意文章指定為僅在用戶登錄後才能查看。文章作者也可以啟用或禁用其自己文章的登錄保護。

這是一種容易要求登錄以查看特定頁面 / 文章的方式。

嘗試查看包括任何此類指定帖子的任何頁面的未經身份驗證的站點訪問者將自動重定向到站點的默認登錄頁面,然後在他們登錄後返回原始頁面,從而僅限於訂閱者及以上的已登錄用戶訪問。

插件仍然允許未經身份驗證的下載站點的饋送,但會從饋送列表中過濾出所有需要登錄的帖子。

當用戶未登錄時,插件將在搜索結果頁面清單中保護需要登錄的帖子的標題、內容和摘錄。標題/內容/摘錄將被替換為文本“[由 Login Require Press 保護的帖子標題 / 內容 / 摘錄。登錄以查看標題 / 內容 / 摘錄。]”

技術概述:

插件通過在動作“send_headers”中掛鉤特殊邏輯來從任何非饋送和非搜索結果頁面重定向未經身份驗證的客戶端瀏覽器到站點的登錄頁面,以檢測到任何需要登錄的帖子,并通過掛鉤另一個特殊邏輯到所有饋送頁面上過濾出所有需要登錄的帖子,并在搜索結果頁面上保護需要登錄的帖子的標題、內容和摘錄。

標記需要登錄的帖子使用設置為“yes”的自定義字段“login_require_press”。

官方項目 URL:

https://github.com/maratbn/LoginRequirePress

Login Require Press


http://www.maratbn.com/projects/login-require-press

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.4.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Login Require Press」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Overview:
At the time of this writing, the latest version of WordPress, version 5.3, has 3 post visibility options, which are ‘public’, ‘password protected’, and ‘private’.
The ‘password protected’ option allows the site administrator to individually lock certain posts, even from the logged in users, with an additional password / passcode. However, there is currently no built-in way to just deny access only to the unauthenticated users.
Login Require Press is a WordPress plugin that allows site administrators to specifically designate arbitrary posts with any public post type as viewable only after user login. Post authors can also enable or disable login protection for their own posts.
It is an easy way to require login to view specific pages / posts.
Unauthenticated site visitors attempting to view any page that includes any such specifically designated post will then be automatically redirected to the site’s default login page, and then back to the original page after they login, thereby limiting access only to logged-in users with subscriber roles and above.
Plugin will still allow unauthenticated downloading of site’s feeds, but will filter out all login-requiring posts from the feed listings.
Plugin will protect the titles, contents, and excerpts of login-requiring posts in search result page listings when the user is not logged in. The titles / contents / excerpts will be replaced by text “[Post title / content / excerpts protected by Login Require Press. Login to see the title / content / excerpt.]”
Technical summary:
Plugin works by hooking-in special logic into the action ‘send_headers’ to redirect unauthenticated client browsers to the site’s login page from any non-feed and non-search-results page upon detecting any login-requiring post, and by hooking-in another special logic into the filter ‘posts_results’ to filter out all login-requiring posts from all feed page listings, and to protect the titles, contents, and excerpts of login-requiring posts in search result page listings.
Login-requiring posts are marked with a custom field ‘login_require_press’ set to ‘yes’.
Official project URLs:
https://github.com/maratbn/LoginRequirePress

Login Require Press

LoginRequirePress WordPress plugin that allows site administrators to specifically designate arbitrary posts with any public post type as viewable only after user login.

文章
Filter
Apply Filters
Mastodon