1
0

make $serendipity['capabilities'][*] variables work

This commit is contained in:
Ian
2014-10-02 19:11:00 +02:00
parent 6313f50433
commit fbf821c714
2 changed files with 48 additions and 43 deletions

View File

@ -3,6 +3,8 @@
Version 2.0-beta4 / RC? ()
------------------------------------------------------------------------
* Change name and fix $serendipity['capabilities']['jquery_noConflictMode']
* Fix bug in entry listing, which showed wrong categories for
entries (Issue #201)
@ -97,7 +99,7 @@ Version 2.0-beta3 (July 25th, 2014)
to older plugins.
This mode is now considered deprecated and will be removed in
future releases. A new variable:
$serendipity['capabilities']['jquery-noconflict'] = false;
$serendipity['capabilities']['jquery_noConflictMode'] = false;
in your theme's config.inc.php file can now turn of that
noConflict-mode.

View File

@ -1,4 +1,5 @@
<?php # $Id$
<?php
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
@ -8,16 +9,18 @@ if (IN_serendipity !== true) {
include_once S9Y_INCLUDE_PATH . 'include/functions.inc.php';
/* Core API function mappings
* This allows the s9y Core to also execute internal core actions on plugin API hooks
* Future use: Global variable can be customized/overriden by your own plugin on the frontend_configure event
* or during runtime,
* or during runtime, or the serendipity_config_local.inc.php file.
*/
$serendipity['capabilities']['jquery'] = true;
$serendipity['capabilities']['jquery_backend'] = true;
$serendipity['capabilities']['jquery-noconflict'] = true; //set as being deprecated
if ( false !== $serendipity['capabilities']['jquery'])
$serendipity['capabilities']['jquery'] = true;
if ( false !== $serendipity['capabilities']['jquery_backend'])
$serendipity['capabilities']['jquery_backend'] = true;
if ( false !== $serendipity['capabilities']['jquery_noConflictMode'])
$serendipity['capabilities']['jquery_noConflictMode'] = true; //set as being deprecated, while we should not need it anymore
$serendipity['core_events']['frontend_header']['jquery'] = 'serendipity_plugin_api_frontend_header';
$serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_api_backend_header';
@ -34,7 +37,7 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData,
?>
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
<?php
if ($serendipity['capabilities']['jquery-noconflict']) {
if ($serendipity['capabilities']['jquery_noConflictMode']) {
?>
<script>jQuery.noConflict();</script>
<?php