diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 80fc549c..6f1a58f0 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -321,7 +321,7 @@ function createPage($args) { $key = $pages->add($args); if ($key) { // Call the plugins after page created - Theme::plugins('afterPageCreate'); + Theme::plugins('afterPageCreate', array($key)); reindexCategories(); reindexTags(); @@ -371,7 +371,7 @@ function editPage($args) { $key = $pages->edit($args); if ($key) { // Call the plugins after page modified - Theme::plugins('afterPageModify'); + Theme::plugins('afterPageModify', array($key)); reindexCategories(); reindexTags(); @@ -392,10 +392,10 @@ function editPage($args) { function deletePage($key) { global $pages; global $syslog; - + if ($pages->delete($key)) { // Call the plugins after page deleted - Theme::plugins('afterPageDelete'); + Theme::plugins('afterPageDelete', array($key)); reindexCategories(); reindexTags(); diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index f2dd9393..49200f8b 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -225,11 +225,11 @@ class Theme { return self::javascript($files, $base, $attributes); } - public static function plugins($type) + public static function plugins($type, $args = array()) { global $plugins; foreach ($plugins[$type] as $plugin) { - echo call_user_func(array($plugin, $type)); + echo call_user_func_array(array($plugin, $type), $args); } }