fix serendipity_plugin_api_core_event_hook conditions
This commit is contained in:
@@ -83,23 +83,19 @@ function errorHandlerCreateDOM(htmlStr) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'external_plugin':
|
case 'external_plugin':
|
||||||
switch ($eventData) {
|
if ($eventData == 'admin/serendipity_editor.js') {
|
||||||
case 'admin/serendipity_editor.js':
|
header('Content-Type: application/javascript');
|
||||||
header('Content-Type: application/javascript');
|
global $serendipity;
|
||||||
global $serendipity;
|
|
||||||
|
|
||||||
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', null, 'JS', 'include/plugin_api.inc.php:external_plugin');
|
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', null, 'JS', 'include/plugin_api.inc.php:external_plugin');
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'backend_save':
|
case 'backend_save':
|
||||||
case 'backend_publish':
|
case 'backend_publish':
|
||||||
// this is preview_iframe.tpl updertHooks
|
echo "\n".'<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>'."\n";
|
||||||
echo '<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>';
|
break;
|
||||||
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user