[WordPress] 外掛分享: BP Rewrites

首頁外掛目錄 › BP Rewrites
WordPress 外掛 BP Rewrites 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
20+
安裝啟用
★★★☆☆
3/5 分(2 則評價)
962 天前
最後更新
問題解決
WordPress 5.9+ PHP 5.6+ v1.6.0 上架:2022-04-23

內容簡介

參與建立BuddyPress下一代 URL 解析的過程!

BP Rewrites 是一個BuddyPress功能的外掛,其最終目標是與BuddyPress核心合併。它由正式BuddyPress開發團隊開發和維護。將BP Legacy URL解析器遷移至使用WP Rewrite API可能會對某些BuddyPress插件和主題造成破壞性的變化,因此在安全地將其包含到BuddyPress核心之前,BuddyPress團隊需要大量測試這個功能。我們需要BuddyPress的用戶、貢獻者和開發人員協助測試BP Rewrites外掛,以應對這一挑戰。

請通過使用您特定的配置(插件、佈景主題、bp-custom.php 文件和常數)來幫助我們測試BP Rewrites外掛。

使用WP Rewrite API的好處

所有BuddyPress生成的URL都是可自定義的。
BuddyPress與純URL永久鏈接完全兼容。
解析BuddyPress URL更快、更可靠、更具擴展性、更易於測試,並完全符合WordPress最佳實踐。

另外,與BuddyPress 11.0結合使用時,BP Rewrites外掛還添加了一個新的BuddyPress設置選項,以僅將BuddyPress生成的頁面(您網站的社區區域)限制為會員使用(參見下面的截圖)。

BP Rewrites如何改變BuddyPress的行為?

啟用後,該外掛會將現有的BuddyPress頁面的文章類型編輯為buddypress文章類型。因此,在BP Rewrites外掛有效期內,您將無法在相應的WordPress管理編輯屏幕上看到BuddyPress頁面。BuddyPress頁面設置屏幕被替換為BuddyPress URL設置屏幕(參見下面的截圖)。這個新屏幕是您定義自定義別名的地方,這些別名將作為相應buddypress文章類型項目的帖子元數據保存。然後,BP Rewrites外掛利用BuddyPress hook/API更改BP Core的行為。

如果您注意到您的某個BuddyPress插件或您的主題未遵守預期行為,請將wp-config.php 文件中WP_DEBUG常數暫時定義為true。您應該會看到一些警告通知,證實了BP Rewrites附加功能引入了問題。您可以使用此插件的支持論壇告知我們,或最好在外掛的 GitHub庫中提交問題。

如何恢復常規的BuddyPress行為?

只需停用BP Rewrites外掛即可。當您停用該外掛時,buddypress文章類型的項目將恢復為常規頁面,並將它們重新顯示在相應的WordPress管理編輯屏幕上。如果您想重新啟用BP Rewrites外掛(當您在測試另一個BuddyPress插件時可能發生),則保留了文章元數據。如果您絕對想要刪除這些帖子元數據,您可以刪除BuddyPress頁面,創建新頁面,然後從BuddyPress頁面設置屏幕重新映射頁面。

加入我們的社區

如果您有興趣貢獻BuddyPress,我們很樂意為您提供幫助。請進入BuddyPress Documentation網站了解如何參與貢獻。

擴展BuddyPress社區,對所有人來說都意味著更好的軟件!

外掛標籤

開發者團隊

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

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

原文外掛簡介

Get involved into building the BuddyPress’ next way of parsing URLs!
BP Rewrites is a BuddyPress feature as a plugin which end goal is to be merged with BuddyPress Core. It’s being developed and maintained by the official BuddyPress development team. As migrating the BP Legacy URL parser to using the WP Rewrites API is potentially a breaking change for some BuddyPress plugins and themes, the BuddyPress team needs the BuddyPress users, contributors & developers to massively test this feature before safely including it into BuddyPress Core.
Please help us meeting this challenge by testing the BP Rewrites plugin with your specific configurations (Plugins, theme, bp-custom.php file, constants).
Benefits about using the WP Rewrite API

All BuddyPress generated URLs are customizable.
BuddyPress is fully compatible with plain URL permalinks.
Parsing BuddyPress URLs is faster, more reliable, extensible, testable and fully compliant with WordPress best practices.

PS: combined with BuddyPress 11.0, the BP Rewrites plugin is also adding a new BuddyPress Settings option to restrict the BuddyPress generated pages (aka the community area of your site) to your members only.
How BP Rewrites changes BuddyPress’ behavior?
Once activated, The plugin is editing the post type of the existing BuddyPress pages in favor of the buddypress post type. That’s why you don’t see the BuddyPress pages anymore (as long as the BP Rewrites plugin is active) into the corresponding WordPress Administation edit screen. The BuddyPress Pages settings screen is replaced by a BuddyPress URLs settings screen (see the screenshot below). This new screen is where you can define custom slugs which will be saved as a post meta of the corresponding buddypress post type item. Then the BP Rewrites plugin is taking benefit from BuddyPress hooks/APIs to change BP Core’s behavior.
If you notice one of your BuddyPress plugins or your theme are not behaving the way they should, please temporarly define the WP_DEBUG constant to true into the wp-config.php file of your website. You should see some warning notices confirming there’s an issue involving changes introduced by the BP Rewrites add-on. You can tell us about it using this plugin’s support forum or best submitting an issue into the GitHub repository of the plugin.
How to get regular BuddyPress’ behavior back?
Simply deactivate BP Rewrites. When you deactivate the plugin, the buddypress post type’s items are switched back to regular pages and you get them back into the corresponding WordPress Administation edit screen. Post metas are still there in case you want to activate BP Rewrites again (this can happen when you’re testing another BuddyPress plugin). If you absolutely want to get rid of these post metas, you can delete the BuddyPress pages, create new ones and redo the page mapping from the BuddyPress Pages settings screen.
Join our community
If you’re interested in contributing to BuddyPress, we’d love to have you. Head over to the BuddyPress Documentation site to find out how you can pitch in.
Growing the BuddyPress community means better software for everyone!

延伸相關外掛

文章
Filter
Apply Filters
Mastodon