Add new parameter "empty" to {serendipity_showPlugin}
This commit is contained in:
@@ -3,6 +3,15 @@
|
|||||||
Version 1.6 ()
|
Version 1.6 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Added new parameter "empty" to {serendipity_showPlugin}. When
|
||||||
|
no callable plugins were found, the string in the "empty" parameter
|
||||||
|
will be shown instead, allowing users to get notified of a missing
|
||||||
|
plugin:
|
||||||
|
|
||||||
|
{serendipity_showPlugin
|
||||||
|
class="serendipity_plugin_twitter"
|
||||||
|
empty="Twitter plugin not found!"}
|
||||||
|
|
||||||
* Bundle jquery by default and enable it in frontend and backend
|
* Bundle jquery by default and enable it in frontend and backend
|
||||||
templates; overrides serendipity_event_jquery. If your template
|
templates; overrides serendipity_event_jquery. If your template
|
||||||
contains its own "jquery.js" file, the core will NOT use it.
|
contains its own "jquery.js" file, the core will NOT use it.
|
||||||
|
|||||||
@@ -469,7 +469,13 @@ function serendipity_smarty_showPlugin($params, &$smarty) {
|
|||||||
$params['template'] = 'sidebar.tpl';
|
$params['template'] = 'sidebar.tpl';
|
||||||
}
|
}
|
||||||
|
|
||||||
return serendipity_plugin_api::generate_plugins($params['side'], null, $params['negate'], $params['class'], $params['id'], $params['template']);
|
$out = serendipity_plugin_api::generate_plugins($params['side'], null, $params['negate'], $params['class'], $params['id'], $params['template']);
|
||||||
|
|
||||||
|
if (empty($out) && !empty($params['empty'])) {
|
||||||
|
return $params['empty'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user