fix: partner 偵測符號對齊實際存在的常數 + schema 期望值補齊 #1
Reference in New Issue
Block a user
Delete Branch "fix/partner-detection-symbols"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
舊版
TMDO_Mobile_Bridge::register()偵測TMEETMB_Plugin類別,在 partner 外掛中根本不存在。偵測實際完全靠file_exists()後備撐著——程式碼讀起來像在驗證「partner 已載入」,實際只驗證了「目錄存在」。修法:改用
TMEETMB_VERSION/TMEETMB_PLUGIN_DIR,兩者在 partner 主檔的檔案解析當下即define,早於plugins_loaded,故本 AddOn bootstrap 的:6時點確實可用。file_exists()後備保留不動,行為不變。為何值得修:這是潛伏風險而非現行 bug。哪天有人看到這些
class_exists()覺得多餘而移除file_exists(),就會複製出2meet-data-optimizer-infocards-addon那場事故——該 AddOn 因獨缺 file_exists 後備,hook 從未掛上,等同未啟用。實測驗證(mu-plugin 於
plugins_loaded:6量測真實 HTTP 請求):TMEETMB_VERSION= AVAILABLE。5 個 AddOn 合計 29 張表註冊,欄位與索引定義 100% 完整;wp wpdo doctor89 OK / 0 FAIL。同一版本另含先前未提交的 schema 工作:補齊
expected_columns/indexes,並將 registry 索引 config key 由expected_indexes更正為indexes(wp_parse_args()會靜默丟棄未知 key,索引期望值先前等同從未送達 registry)。🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.