Tofu
Tofu is the best food all around the world!


Mail2Commenter

A.shun 同學推薦的插件,已經 475 天沒更新了 =.=!
插件功能還成,只是和 WP-UA 插件有衝突 =.=!
下午看了下,M2C 有句

  1. $message = apply_filters('comment_text', $message);

而恰好 WP-UA 插件定義了這個 filter =.=!

  1. add_filter('comment_text', 'wp_useragent');

且在執行完畢後移除了

  1. remove_filter('comment_text', 'wp_useragent');

不清楚這兩個插件的執行順序,總之是 M2C 用了一個被重新定義的或者不存在的 filter 來過濾內容,從而造成過濾結果為空 =.=!
其實 M2C 在 apply_filter() 之前已經定義了私有的 filter 且 $message 也能取到正常的評論內容

  1. $filter = mailtocommenter_filter($commentdata,$name);
  2. $subject =$filter[0];
  3. $message = $filter[1];

所以看起來 apply_filters(‘comment_text’, $message) 是無用的,乾脆刪掉,免得衝突 =.=!

PS, 昨晚 NOD32 更新之後造成 Opera 10.10 讀取郵件時卡死兩三秒,浪費我一上午的時間沒搞定終是關掉了實時防護 =.=!
還好臨下班前 sysadmin 給了個補丁,據 sysadmin 說 10.5x 卡得尤甚 =.=!


  1. Notify 卡农 @

    看到最后那段关于NOD32的,,为啥我会有点幸灾乐祸的感觉……罪过罪过……Cs你不如临时体验下卡巴斯基吧,顺带测试下它的第三方密码管理器

  2. Notify Csineneo @

    @卡农 唉,大學的時候天天聽殺豬聲 =.=!

  3. Notify A.shun @

    这个方法要收藏

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).