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

Master Post Password

外掛說明

這個外掛可設定用於全部受密碼保護文章的文章主密碼,已設定的文章原始密碼也依然保有保護功能。

Once the master post password has been provided by a visitor for any passworded post on the site, it applies to unlock all other passworded posts (without needing to provide the master post password again for each such post) until the site’s cookies expire in the browser.

There are two means by which the master post password can be defined:

a.) As a constant, C2C_MASTER_POST_PASSWORD. This is typically done in wp-config.php like so:

define( 'C2C_MASTER_POST_PASSWORD', 'your_master_post_password' );

b.) Via the settings field labeled “Master Post Password” found on the Settings -> Reading admin page.

If the constant is defined, it takes precedence and the settings field is NOT displayed.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

螢幕擷圖

  • A screenshot of the Settings -> Reading admin page showing the “Master Post Password” input field.

安裝方式

  1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically /wp-content/plugins/).
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Set a master post password
    a. via the ‘Settings’ -> ‘Reading’ admin menu
    b. (optional; advanced) Set the master post password via C2C_MASTER_POST_PASSWORD constant. This also serves to prevent the admin option from being displayed.

常見問題集

Does this work for *all* passworded posts, regardless of their explicitly set post password?

Yes.

Does the explicitly set post password for a given post still work?

Yes. A visitor can supply either the post’s password or the master post password to access the content.

Will this require a password for posts that didn’t already have a post password configured?

No. It only affects posts that already have a post password.

Does this remove or change the password for passworded posts to the master post password?

No. Any explicitly set post password remains unchanged and functional. The master post password is saved separately from posts.

If I have multiple password protected posts listed, do I need to provide the master post password for each one to view them all (a bit redundant since I obviously know the master post password and it applies to all of them)?

No, if you provide the master post password for one post, it’ll automatically be applied to all passworded posts until the site’s browser cookies expire.

What happens if I change the master post password?

Other than the obvious (the master post password has a new value), all existing users of the old master post password will expire when a browser attempts to view a passworded post. The visitor will have to provide the original post password(s) or the new master post password. If a visitor accessed a passworded post using the post’s explicitly set post password, then they will not be affected by a master post password change.

Is the master post password stored securely?

No. As is the case for post passwords in WordPress, the master post password is stored in the database as plaintext. That is, unless the master post password is set by a constant, in which case it is never stored in the database and only in the given .php file (typically wp-config.php, where other site passwords are defined).

Why can’t I see the setting on the “Reading Settings” admin page?

Are you logged in as an administrative user who can access the “Settings” -> “Reading” admin page? Is the plugin installed and activated?

Assuming those are true, have you set a master post password via the C2C_MASTER_POST_PASSWORD constant? If so, the admin setting will not be displayed.

Does this plugin include unit tests?

Yes.

Is this plugin localizable?

Yes.

Is this plugin GDPR-compliant?

Yes. This plugin does not collect, store, or disseminate any information from any users or site visitors.

使用者評論

2020 年 6 月 23 日
With this little plugin I could turn my WooCommerce shop into a private shop … without the very expensive Woo password plugin. Thanks !
2017 年 4 月 20 日
I had problems with massive-protected-posts with different passwords. But this plugin saved me. Thank you for wonderful plugin.
閱讀全部 4 則使用者評論

參與者及開發者

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

參與者

〈Master Post Password〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Master Post Password〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.3.7 (2023-08-05)

  • Change: Note compatibility through WP 6.3+
  • Change: Update copyright date (2023)

1.3.6 (2021-10-04)

  • Change: Note compatibility through WP 5.8+
  • Change: Tweak installation instruction
  • Unit tests:
    • Change: Restructure unit test directories
      • Change: Move phpunit/ into tests/
      • Change: Move phpunit/bin into tests/
    • Change: Remove ‘test-‘ prefix from unit test file
    • Change: In bootstrap, store path to plugin file constant
    • Change: In bootstrap, add backcompat for PHPUnit pre-v6.0
  • New: Add a couple more possible TODO items

1.3.5 (2021-04-20)

  • Change: Note compatibility through WP 5.7+
  • Change: Tweak some documentation formatting
  • Change: Update copyright date (2021)
  • New: Add a few more possible TODO items

Full changelog is available in CHANGELOG.md.