Drain HoleをGengoと共存させる

ダウンロードリンクを貼り付けるのに便利な Drain Hole

Gengo環境下でインストールすると get_currentuserinfo()関数は未定義 といったエラーが出るのでパッチ当て。

Index: drain-hole.php
===================================================================
--- drain-hole.php      (revision 105)
+++ drain-hole.php      (working copy)
@@ -57,6 +57,13 @@

        function DrainholePlugin ()
        {
+               $this->add_action ('init');
+               $this->add_filter ('redirection_first');
+               $this->add_action ('plugins_loaded');
+    }
+
+    function init()
+    {
                $this->register_plugin ('drain-hole', __FILE__);

                if (is_admin ())
@@ -78,9 +85,6 @@
                        $this->add_filter ('the_content');
                        $this->add_filter ('the_excerpt', 'the_content');
                }
-
-               $this->add_filter ('redirection_first');
-               $this->add_action ('plugins_loaded');
        }

 

パッチファイルのダウンロード »

コメントはまだありません

(Required)
(Required, will not be published)