Example commit on how to BC-use the new event hooks.

References #152
This commit is contained in:
Garvin Hicking 2014-05-19 10:30:41 +02:00
parent 9a6e4aa63a
commit 51bff3ab7e
2 changed files with 9 additions and 4 deletions

View file

@ -1 +1,2 @@
0.9: Use serendipity 2.0 backend hook
0.8: Added additional backend markup for 2.0 backend (yellowled)

View file

@ -27,13 +27,14 @@ class serendipity_event_adminnotes extends serendipity_event {
'php' => '4.1.0'
));
$propbag->add('version', '0.8');
$propbag->add('version', '0.9');
$propbag->add('author', 'Garvin Hicking, Matthias Mees');
$propbag->add('stackable', false);
$propbag->add('configuration', array('feedback', 'limit', 'html', 'markup', 'cutoff'));
$propbag->add('event_hooks', array(
'backend_frontpage_display' => true,
'backend_sidebar_entries' => true,
'backend_sidebar_admin' => true,
'backend_sidebar_entries_event_display_adminnotes' => true,
'css_backend' => true,
)
@ -433,12 +434,15 @@ class serendipity_event_adminnotes extends serendipity_event {
?>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=adminnotes"><?php echo PLUGIN_ADMINNOTES_TITLE; ?></a></li>
<?php
} else {
}
// Serendipity 2.0 now uses the new backend_sidebar_admin hook
break;
case 'backend_sidebar_admin':
?>
<li><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=adminnotes"><?php echo PLUGIN_ADMINNOTES_TITLE; ?></a></li>
<?php
}
break;
case 'backend_sidebar_entries_event_display_adminnotes':