X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fdemo_plugin%2Fdemo_plugin.php;h=ca520d15147ce937302eb99d0a15c38c1721e2fb;hb=9d9f6d75b94aab51067bdfbe50b58b66d1194f6d;hp=b80a2b6d5175bfb57d8dcf9774c4336357807c5b;hpb=6a65bc579810e3688a63a7c3b0e720dc0f5456b0;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php index b80a2b6d..ca520d15 100644 --- a/plugins/demo_plugin/demo_plugin.php +++ b/plugins/demo_plugin/demo_plugin.php @@ -73,7 +73,6 @@ function hook_demo_plugin_render_header($data) { // Only execute when linklist is rendered. if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { - // If loggedin if ($data['_LOGGEDIN_'] === true) { /* @@ -109,10 +108,10 @@ function hook_demo_plugin_render_header($data) * ], * ] * This example renders as: - *
- * - * - *
+ *
+ * + * + *
*/ $form = array( 'attr' => array( @@ -378,17 +377,13 @@ function hook_demo_plugin_render_daily($data) // Manipulate columns data - foreach ($data['cols'] as &$value) { - foreach ($value as &$value2) { - $value2['formatedDescription'] .= ' ಠ_ಠ'; - } + foreach ($data['linksToDisplay'] as &$value) { + $value['formatedDescription'] .= ' ಠ_ಠ'; } // Add plugin content at the end of each link - foreach ($data['cols'] as &$value) { - foreach ($value as &$value2) { - $value2['link_plugin'][] = 'DEMO'; - } + foreach ($data['linksToDisplay'] as &$value) { + $value['link_plugin'][] = 'DEMO'; } return $data; @@ -452,8 +447,7 @@ function hook_demo_plugin_render_feed($data) foreach ($data['links'] as &$link) { if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) { $link['description'] .= ' - ATOM Feed' ; - } - elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) { + } elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) { $link['description'] .= ' - RSS Feed'; } }