From 4ac142ce9e15984293dd6e4e1b53e86e68962f66 Mon Sep 17 00:00:00 2001
From: joyqi <magike.net@gmail.com>
Date: Tue, 15 Aug 2017 11:35:38 +0800
Subject: [PATCH] add new plugin hook

---
 var/Typecho/Widget.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/var/Typecho/Widget.php b/var/Typecho/Widget.php
index 9ba7d0dd..474f4e37 100644
--- a/var/Typecho/Widget.php
+++ b/var/Typecho/Widget.php
@@ -362,7 +362,12 @@ abstract class Typecho_Widget
      */
     public function __call($name, $args)
     {
-        echo $this->{$name};
+        $method = 'call' . ucfirst($name);
+        $this->pluginHandle()->trigger($plugged)->{$method}($this, $args);
+
+        if (!$plugged) {
+            echo $this->{$name};
+        }
     }
 
     /**