問題描述
我注意到了 wp-includes/theme-compat 目錄。那是什麼呢是主題嗎?
最佳解決方案
theme-compat 目錄由 WordPress 用作備用 template-part 文件的一組不推薦使用的 (因為 WordPress 3.0) 文件組成,以防活動主題未能包含它們。
換句話説,如果主題使用了 get_header()模板標記,但是未能包含 header.php template-part 文件,則 WordPress 將返回到/wp-includes/theme-compat/header.php 。
theme_compat 中的 template-part 文件已被棄用,不受保護,非常老 (通過核心/current-Theme 標準),不應該被任何當前主題所依賴。
參考文獻
注:本文內容整合自 Google/Baidu/Bing 輔助翻譯的英文資料結果。如果您對結果不滿意,可以加入我們改善翻譯效果:薇曉朵技術論壇。