This should make jquery.js of a theme no longer be included for the default backend.

Custom backends would now use jquery_backend.js if they really wanted to provide their own.

References #166
This commit is contained in:
Garvin Hicking
2014-05-22 11:59:50 +02:00
parent e8bae220e6
commit 0e008d0885
2 changed files with 12 additions and 2 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php';
* or during runtime,
*/
$serendipity['capabilities']['jquery'] = true;
$serendipity['capabilities']['jquery_backend'] = true;
$serendipity['core_events']['frontend_header']['jquery'] = 'serendipity_plugin_api_frontend_header';
$serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_api_backend_header';
@@ -44,8 +45,8 @@ function serendipity_plugin_api_backend_header($event_name, &$bag, &$eventData,
// jquery can be disabled if a template's config.inc.php or a plugin sets
// $serendipity['capabilities']['jquery'] = false
$check = serendipity_getTemplateFile('jquery.js');
if (!$check && $serendipity['capabilities']['jquery']) {
$check = serendipity_getTemplateFile('jquery_backend.js');
if (!$check && $serendipity['capabilities']['jquery_backend']) {
?>
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
<?php