WordPress 的資料庫架構更新

WordPress 2.1 Database Changes 看到 2.1 會改變本來 backward-compatible 的資料庫的存取方式 (直接指定 table name,而不是透過 $wpdb 抓 table name),這使得用舊方法的 Plugin 與 Theme 會出問題。

對於一般使用 release tarball 安裝的人應該沒有差,需要注意的人是從 SVN 版更新的。

完整的說明可以參考 WordPress 開發 Blog 上的 Is your plugin Naughty or Nice? 這篇。

6 Responses to “WordPress 的資料庫架構更新”


  1. 1 roga

    啊..

    可是我看 WP 官方那邊講「…When you’re developing plugins that contain SQL statements, ensure you globalize $wpdb, and call tables using $wpdb->posts, $wpdb->post2cat, etc….」

    好像是叫人家寫 plugin 的時候,要使用 $wpdb 全域變數,然後叫 table 要用 $wpdb->posts 之類的東西..orz

  2. 2 Gea-Suan Lin

    有什麼問題嗎?

  3. 3 roga

    阿哩,其實是我看錯了 (大尷尬) ,沒事 orz

  1. 1 苦牢之最後一年
  2. 2 Wordpress 2.0.7 釋出 at wILliAm’s bLog
  3. 3 ericsk’s blog » Blog Archive » 適合在 WordPress 2.1 上使用的 plugins

Leave a Reply