From a15c0aa218fabd2de93e962dc7c697c4bf7ce72f Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Thu, 31 May 2012 09:26:48 -0400
Subject: [PATCH] Add some padding to iframe footer

---
 program/include/rcube_plugin_api.php |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php
index fbf3584..be12f11 100644
--- a/program/include/rcube_plugin_api.php
+++ b/program/include/rcube_plugin_api.php
@@ -230,6 +230,20 @@
         'message' => "Invalid callback function for $hook"), true, false);
   }
 
+  /**
+   * Allow a plugin object to unregister a callback.
+   *
+   * @param string $hook Hook name
+   * @param mixed  $callback String with global function name or array($obj, 'methodname')
+   */
+  public function unregister_hook($hook, $callback)
+  {
+    $callback_id = array_search($callback, $this->handlers[$hook]);
+    if ($callback_id !== false) {
+      unset($this->handlers[$hook][$callback_id]);
+    }
+  }
+
 
   /**
    * Triggers a plugin hook.

--
Gitblit v1.9.1