aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/demo_plugin/demo_plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/demo_plugin/demo_plugin.php')
-rw-r--r--plugins/demo_plugin/demo_plugin.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php
index f3a63b6a..95ea7fe2 100644
--- a/plugins/demo_plugin/demo_plugin.php
+++ b/plugins/demo_plugin/demo_plugin.php
@@ -15,6 +15,8 @@
15 */ 15 */
16 16
17use Shaarli\Config\ConfigManager; 17use Shaarli\Config\ConfigManager;
18use Shaarli\Plugin\PluginManager;
19use Shaarli\Router;
18 20
19/** 21/**
20 * In the footer hook, there is a working example of a translation extension for Shaarli. 22 * In the footer hook, there is a working example of a translation extension for Shaarli.
@@ -73,7 +75,6 @@ function hook_demo_plugin_render_header($data)
73{ 75{
74 // Only execute when linklist is rendered. 76 // Only execute when linklist is rendered.
75 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { 77 if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
76
77 // If loggedin 78 // If loggedin
78 if ($data['_LOGGEDIN_'] === true) { 79 if ($data['_LOGGEDIN_'] === true) {
79 /* 80 /*
@@ -109,10 +110,10 @@ function hook_demo_plugin_render_header($data)
109 * ], 110 * ],
110 * ] 111 * ]
111 * This example renders as: 112 * This example renders as:
112 * <form form-attribute-1="form attribute 1 value" form-attribute-2="form attribute 2 value"> 113 * <form form-attribute-1="form attribute 1 value" form-attribute-2="form attribute 2 value">
113 * <input input-1-attribute-1="input 1 attribute 1 value" input-1-attribute-2="input 1 attribute 2 value"> 114 * <input input-1-attribute-1="input 1 attribute 1 value" input-1-attribute-2="input 1 attribute 2 value">
114 * <input input-2-attribute-1="input 2 attribute 1 value"> 115 * <input input-2-attribute-1="input 2 attribute 1 value">
115 * </form> 116 * </form>
116 */ 117 */
117 $form = array( 118 $form = array(
118 'attr' => array( 119 'attr' => array(
@@ -448,8 +449,7 @@ function hook_demo_plugin_render_feed($data)
448 foreach ($data['links'] as &$link) { 449 foreach ($data['links'] as &$link) {
449 if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) { 450 if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) {
450 $link['description'] .= ' - ATOM Feed' ; 451 $link['description'] .= ' - ATOM Feed' ;
451 } 452 } elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) {
452 elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) {
453 $link['description'] .= ' - RSS Feed'; 453 $link['description'] .= ' - RSS Feed';
454 } 454 }
455 } 455 }