fix(compat): CLI 雙命名空間 + 選單 slug 對齊 + i18n text domain(E4/E6/E7)
E4:38 個子指令補 'wp tmdo' 註冊(原本只有 'wp wpdo')
cli-v2 15、cli-post 8、cli-member 7、cli-term-comment 8。
CLAUDE.md 宣稱 tmdo 為主命名空間,但 wp tmdo bridge-status /
snapshot create 等先前根本不存在。
E6:MENU_SLUG 由 '2meet-data-optimizer' 改回 'wp-data-optimizer'。
B 內部有 10+ 處連結(help-tabs、setup-wizard ×5、conflict-monitor、
export、3 個 template)硬編碼舊 slug,與註冊值不符 → 這些連結目前
全部 404。既然本外掛已沿用 wpdo_ 的表/option/cron/hook/CLI 命名空間,
選單 slug 一併回到同一套最連貫,A 退休後亦無衝突。
E7:13 處殘留的 'uae' text domain 改為 '2meet-data-optimizer'
(conflict-detector 3、mode-manager 9、entity-migration-engine 1;
另一處 'uae' 是陣列 key 非 text domain,保留)。
unit 451 / integration 398 GREEN
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -19,7 +19,15 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
class TMDO_Admin {
|
||||
|
||||
/** Menu slug. */
|
||||
private const MENU_SLUG = '2meet-data-optimizer';
|
||||
/**
|
||||
* Admin page slug.
|
||||
*
|
||||
* Kept as `wp-data-optimizer` on purpose: this plugin already inherits the
|
||||
* wpdo_ table / option / cron / hook / CLI namespace, existing bookmarks and
|
||||
* sister-plugin links point here, and ~10 links inside this plugin (help tabs,
|
||||
* setup wizard, conflict monitor, stress-test templates) hardcode it.
|
||||
*/
|
||||
private const MENU_SLUG = 'wp-data-optimizer';
|
||||
|
||||
/** Nonce action. */
|
||||
private const NONCE_ACTION = 'wpdo_admin_action';
|
||||
|
||||
Reference in New Issue
Block a user