Files
wpdev 6e1b31b4f7
Tests / PHP Lint (pull_request) Successful in 38s
chore(2meet-data-optimizer-infocards-addon): 0.1.2 repackage (no functional change)
Version bump for a re-release packaged alongside the WP-MVB v8 hub (dev39)
acceptance; code is identical to the previous release.
2026-10-02 15:47:43 +08:00

4.1 KiB
Raw Permalink Blame History

Changelog

All notable changes to this AddOn will be documented here.

Format follows Keep a Changelog. Versioning follows Semantic Versioning.


[Unreleased]

  • Phase 4 implementation in progress.

[0.1.2] — 2026-10-02 — 重新打包

Changed

  • 重新打包(無功能變更):與 WP-MVB v8 樞紐站(dev39)一同驗收後發版;程式碼與前一版相同。

[0.1.1] — 2026-08-08 — 修復 partner 偵測時序 bug(AddOn 從未生效)與 IG 欄位 meta_key 錯配

Fixed

  • 本 AddOn 從未掛上任何 hook,等同未啟用(嚴重)。 TMDO_Infocards::register() 舊版在 bootstrap 當下就以 class_exists( 'TMEETIC_*' ) 偵測 partner,失敗即 early return。但本 AddOn bootstrap 掛在 plugins_loaded:6,而 2meet-infocards 要到 plugins_loaded:20(tmeetic_run)才 require 自身類別——在 :6 當下 TMEETIC_* 類別一律不存在,偵測必定失敗,於是 wpdo_register_fields / wpdo_register_custom_tables 兩個 hook 從未被掛上(實測:TMEETIC_Frontend 在 prio 6 = MISSING、prio 21 = EXISTS)。三處修法:
    1. 偵測從 bootstrap 移進 hook callback 內執行(register_post_fields() / register_custom_tables() 開頭),hook 一律先掛上。核心於 plugins_loaded:30 有 late-bind safety net 會重新 fire 註冊 hook,唯有把 偵測延後到 callback 執行當下才會正確生效。
    2. 偵測改以 TMEETIC_VERSION / TMEETIC_PLUGIN_DIR 常數優先,class_exists() 退為後備。這兩個常數在 2meet-infocards.php 的檔案解析當下即 define, 早於 plugins_loaded;核心 fire_registration() 最早在 plugins_loaded:4 觸發,該時點只有常數可用,只靠 class_exists() 會在最關鍵的第一次註冊誤判 為「partner 不存在」。
    3. bootstrap priority 由 6 提前到 3,wpdo_register_custom_tables callback priority 設為 5。理由有二:核心 fire_registration() 最早在 plugins_loaded:4 觸發,掛在 :6 必定錯過第一次註冊;且 TMDO_Custom_Table_Registry 對同一 provider:table_name 是「先註冊者勝、 後者回傳 false」,主外掛 2meet-infocards 的 closure 在檔案解析當下就掛上 prio 10,若不提前,會先以無 expected_columns 的版本佔走 key。
  • IG token 兩個欄位註冊的 meta_key 與 2meet-infocards 程式碼實際讀寫的 key 不符, 導致它們從未真正進入 TMDO 加速路徑(仍落回 wp_postmeta):
    • tmeetic_ig_token_enc → tmeetic_ig_access_token_enc
    • tmeetic_ig_token_expires_at → tmeetic_ig_token_expiry
  • TMDO_Custom_Table_Registry::register() 的索引期望值 config key 由 expected_indexes 更正為 indexes。該 API 以 wp_parse_args() 併入預設值, 未知 key 會被靜默丟棄——先前索引期望值等同從未送達 registry, wp wpdo doctor 的 schema drift 只驗欄位、不驗索引。此問題橫跨全部 8 個 AddOn, 已一併更正。

Added

  • 註冊先前完全未註冊的兩個 hp_vendor Cold zone 欄位:tmeetic_ig_username、 tmeetic_ig_feed_show。
  • 為 2meet_vendor_profiles(16 欄)/ 2meet_cards(25 欄)/ 2meet_theme_styles(8 欄)三張表補上 expected_columns 與 indexes, wp wpdo doctor 才能對它們做 schema drift 檢查。先前只註冊表名,doctor 無從判斷欄位或索引是否漂移。

Removed

  • 移除 tmeetic_ig_app_id、tmeetic_ig_app_secret_enc 兩個幽靈註冊。IG 應用 憑證是站台層級設定,實際存於 wp_options 的 2meetic_ig_app_id / 2meetic_ig_app_secret_enc,並非 hp_vendor postmeta;全外掛對這兩個 postmeta key 零讀寫,註冊只會在 Cold zone 留下永遠空的欄位定義。

[0.1.0] — TBD

Added (initial release, scaffold)

  • Plugin scaffold from wp-data-optimizer v2.16.0 extraction plan.
  • Plugin Header + bootstrap stub + 7 MD + composer.json.
  • Requires Plugins: 2meet-data-optimizer, 2meet-infocards.