內容簡介
這個除錯/開發工具從 $bp Global 中提取當前組件 (current_component) 和當前動作 (current_action) 的名稱進行顯示。有時動作名稱並不存在,或者與顯示的鏈接不匹配,因此了解發生了什麼情況是很好的。此外,Buddypress 對於普通 WordPress 頁面和文章擁有自己的組件和動作名稱,了解這一切將使您能夠編寫條件語句以顯示每個組件的不同內容。使用這個工具可以輕鬆查看這些變數。這可能看起來毫無必要,但相信我它很有幫助。我以前不知道當您轉到您的個人資料頁面時,組件為 activity,動作為 just-me,直到我創建了這個簡單的工具。
外掛標籤
開發者團隊
原文外掛簡介
This debugging/development tool displays names of the current_component and the current_action as extracted from the $bp Global. Sometimes action names don’t exist or they might not match the displayed link, so its good to know what is going on. Aditionally Buddypress has its own component and action names for the regular wordpress pages and blog posts, seing how this all works will enable you to write conditionals to display different content for each component. With this tool it is easy to see what those variables are. It might seem unnecessary but believe me it helps. I never knew that when you go to your profile page the component=activity and the action=just-me, until I created this simple tool.
