serendipity_editor.js.tpl without core

To have this in the plugin api didn't look right. the fallback to default works this time, so this should be alright.
This commit is contained in:
onli
2014-03-23 23:53:55 +01:00
parent 0d54063c5e
commit 7bf373248b
3 changed files with 13 additions and 12 deletions
+10
View File
@@ -108,6 +108,16 @@ serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $t
function serendipity_plugin_api_pre_event_hook($event, &$bag, &$eventData, &$addData) {
// Check what Event is coming in, only react to those we want.
switch($event) {
case 'external_plugin':
switch ($eventData) {
case 'admin/serendipity_editor.js':
header('Content-Type: application/javascript');
$data = array('token_url' => serendipity_setFormToken("url"));
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', $data);
break;
}
break;
case 'js':
// always add newlines to the end of last element, in case of other plugins using this hook and
// always start at line Col 1, to populate the (virtual) serendipity.js file