[WordPress] 外掛分享: Advanced Post Password

首頁 › 外掛目錄 › Advanced Post Password
WordPress 外掛 Advanced Post Password 的封面圖片
全新外掛
安裝啟用
—
尚無評分
11 天前
最後更新
—
問題解決
WordPress 6.0+ PHP 7.4+ v1.2 上架:2022-01-26

內容簡介

這個外掛讓你可以在不用在每個文章中輸入密碼的情況下,登入各個文章。如果你是管理員,則不需要在任何受保護的頁面中輸入密碼。

你可以設定一個主要網址來訪問所有受密碼保護的文章。

此外,這個外掛還刪除 WordPress 在私人和受密碼保護的頁面中添加的前綴。

使用方法:安裝並啟用此外掛。

外掛標籤

開發者團隊

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

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

原文外掛簡介

WordPress asks for the password of a protected post every time the cookie of that post is not there, and every protected post has its own password. Advanced Post Password adds a few things on top of that behaviour, all optional:
The password is remembered per post. When a visitor types the password of a protected post, the plugin stores its own cookie for that post, separate from the WordPress one. The visitor can then browse that post and come back later without typing it again.
Administrators never see the password form. If you are logged in as an administrator, protected posts open directly, so you can check a draft or a client area without typing the password each time.
One master URL opens everything. Choose a URL and a password: whoever enters that password on that URL gets access to every protected post on the site, without typing the password of each one.
Cleaner titles. WordPress prepends “Protected:” and “Private:” to the titles of those posts. Two checkboxes remove those prefixes, on the site and in the browser tab.
How it works
The plugin listens to the standard password form of WordPress. When the form is submitted, it checks the password with the same hashing class WordPress uses and sets a cookie named after the post ID. On the next request, the post_password_required filter finds that cookie and skips the form.
The cookie is a hash, never the password in clear, and it expires after a year, the same way WordPress handles its own post password cookie. Cookies created by previous versions of the plugin are still accepted, so upgrading does not log anybody out.
Settings
Go to Settings > Post Password:

No admin password: administrators bypass the form on protected posts.
Removes protected prefix: hides “Protected:” from the titles.
Removes private prefix: hides “Private:” from the titles.
Master URL and Master URL password: the URL where the master password is accepted, and the password itself. Leave both empty to disable the feature.

The master URL should be a page that exists on your site, for example https://example.com/vip/. Visitors who open that page and enter the master password get access to every protected post.

延伸相關外掛

文章
Filter
Mastodon