From 49bff3f7a75fe01de44c8464c549fb300624634a Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Sun, 2 Jan 2011 16:50:48 +0000 Subject: [PATCH] better forwarc ompatibility, using an arrayk --- include/plugin_api.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index d76a4e8c..62334297 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -22,8 +22,8 @@ if (!defined('S9Y_FRAMEWORK_FUNCTIONS')) { * or during runtime, */ $serendipity['capabilities']['jquery'] = true; -$serendipity['core_events']['frontend_header'] = 'serendipity_plugin_api_frontend_header'; -$serendipity['core_events']['backend_header'] = 'serendipity_plugin_api_frontend_header'; +$serendipity['core_events']['frontend_header']['jquery'] = 'serendipity_plugin_api_frontend_header'; +$serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_api_frontend_header'; // Add jquery to all frontend and backend templates function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, $addData) { @@ -1042,8 +1042,9 @@ class serendipity_plugin_api $plugins = serendipity_plugin_api::get_event_plugins(); if ($serendipity['core_events'][$event_name]) { - $apifunc = $serendipity['core_events'][$event_name]; - $apifunc($event_name, $bag, $eventData, $addData); + foreach($serendipity['core_events'][$event_name] as $apifunc_key => $apifunc) { + $apifunc($event_name, $bag, $eventData, $addData); + } } if (function_exists('serendipity_plugin_api_pre_event_hook')) {