Show "Edit this plugin" link for every sidebar plugin
This commit is contained in:
parent
6875291b55
commit
90b2e5662f
@ -3,6 +3,9 @@
|
||||
Version 1.4 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Add a "Configure this plugin" link to the frontend output for
|
||||
every sidebar plugin, not only HTML nuggets. (garvinhicking)
|
||||
|
||||
* Enhance entryproperties plugin to use sequencing widget: Allows
|
||||
you to configure which fields you want to see in the 'Edit Entry'
|
||||
panel for "Advanced Options". (garvinhicking)
|
||||
|
@ -830,6 +830,8 @@ class serendipity_plugin_api
|
||||
if (count($plugins) == 0) {
|
||||
$serendipity['prevent_sidebar_plugins_' . $side] = true;
|
||||
}
|
||||
|
||||
$loggedin = serendipity_userLoggedIn();
|
||||
|
||||
foreach ($plugins AS $plugin_data) {
|
||||
$plugin =& serendipity_plugin_api::load_plugin($plugin_data['name'], $plugin_data['authorid'], $plugin_data['path']);
|
||||
@ -842,6 +844,10 @@ class serendipity_plugin_api
|
||||
$show_plugin = $plugin->generate_content($title);
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
if ($loggedin) {
|
||||
$content .= '<div class="serendipity_edit_nugget"><a href="' . $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($plugin->instance) . '">' . ADMIN . ': ' . EDIT . '</a></div>';
|
||||
}
|
||||
|
||||
if ($show_plugin !== false) {
|
||||
$pluginData[] = array('side' => $side,
|
||||
|
@ -1354,6 +1354,7 @@ class serendipity_html_nugget_plugin extends serendipity_plugin {
|
||||
echo $this->get_config('content');
|
||||
}
|
||||
|
||||
/* THIS FUNCTIONALITY IS NOW IN THE CORE, YET A BIT REDUCED [performance]
|
||||
if (serendipity_userLoggedIn()) {
|
||||
$is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
|
||||
|
||||
@ -1361,6 +1362,7 @@ class serendipity_html_nugget_plugin extends serendipity_plugin {
|
||||
echo '<div class="serendipity_edit_nugget"><a href="' . $serendipity['baseURL'] . '/serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($this->instance) . '">' . EDIT . '</a></div>';
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user