內容簡介
這個外掛程式只有一個功能:如果一個被密碼保護的頁面有子頁面,所有的子頁面都會用相同的密碼保護。
如果在父頁面或任何子頁面上輸入正確的密碼,所有相關頁面都可以被用戶查看。
通過$post->ancestors,此外掛程式可以保護無限層級的孫頁面。它使用第一個被密碼保護的祖先。
其他資訊
目前該外掛程式通過尋找被密碼保護的父頁面,並對當前正在查看的子頁面應用相同的限制方式運作。這意味著子頁面實際上並沒有在數據庫中添加密碼。
我正在試圖決定這是否是最好的處理方式,或者是否應該採取其他路線(例如在寫入或保存文章時為子頁面添加/更新/刪除密碼)。
如果您有任何建議或報告任何錯誤,請在此處自由提供:[http://fullthrottledevelopment.com/password-protect-children-pages/]
謝謝!
外掛標籤
開發者團隊
② 後台搜尋「FT Password Protect Children Pages」→ 直接安裝(推薦)
原文外掛簡介
This plugin does one thing. If a page that is password protected has children pages, all children pages will be protected with the same password.
If the correct password is entered on the parent page or any of its children pages, all related pages will be viewable to the user.
The plugin protects unlimited levels of grandchildren pages via the $post->ancestors. It uses first ancestor that is password protected.
Additional Information
The plugin currently works by looking for parent pages that are password protected and applying the same restrictions the the currently being viewed child page. This means that the children pages do not actually get a password added to the database.
I’m trying to decide if this is the best way to proceeed or if I should take another route (such as adding / updating / removing passwords from children pages at the write or save post screen).
Please feel free to offer any suggestions or report any bugs here: [http://fullthrottledevelopment.com/password-protect-children-pages/]
Thanks!
