Archived
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user