Add new parameter "empty" to {serendipity_showPlugin}
This commit is contained in:
parent
c3c3ee18db
commit
f080241c61
@ -3,6 +3,15 @@
|
||||
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
|
||||
templates; overrides serendipity_event_jquery. If your template
|
||||
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';
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user