diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-07-27 12:34:30 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2019-07-27 12:34:30 +0200 |
commit | 38672ba0d1c722e5d6d33a58255ceb55e9410e46 (patch) | |
tree | dae4c7c47532380eac3ae641db99122fc77c93dc /plugins/demo_plugin/demo_plugin.php | |
parent | 83faedadff76c5bdca036f39f13943f63b27e164 (diff) | |
parent | 1e77e0448bbd25675d8c0fe4a73206ad9048904b (diff) | |
download | Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.tar.gz Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.tar.zst Shaarli-38672ba0d1c722e5d6d33a58255ceb55e9410e46.zip |
Merge tag 'v0.10.4' into stable
Release v0.10.4
Diffstat (limited to 'plugins/demo_plugin/demo_plugin.php')
-rw-r--r-- | plugins/demo_plugin/demo_plugin.php | 24 |
1 files changed, 9 insertions, 15 deletions
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) | |||
73 | { | 73 | { |
74 | // Only execute when linklist is rendered. | 74 | // Only execute when linklist is rendered. |
75 | if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { | 75 | if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) { |
76 | |||
77 | // If loggedin | 76 | // If loggedin |
78 | if ($data['_LOGGEDIN_'] === true) { | 77 | if ($data['_LOGGEDIN_'] === true) { |
79 | /* | 78 | /* |
@@ -109,10 +108,10 @@ function hook_demo_plugin_render_header($data) | |||
109 | * ], | 108 | * ], |
110 | * ] | 109 | * ] |
111 | * This example renders as: | 110 | * This example renders as: |
112 | * <form form-attribute-1="form attribute 1 value" form-attribute-2="form attribute 2 value"> | 111 | * <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"> | 112 | * <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"> | 113 | * <input input-2-attribute-1="input 2 attribute 1 value"> |
115 | * </form> | 114 | * </form> |
116 | */ | 115 | */ |
117 | $form = array( | 116 | $form = array( |
118 | 'attr' => array( | 117 | 'attr' => array( |
@@ -378,17 +377,13 @@ function hook_demo_plugin_render_daily($data) | |||
378 | 377 | ||
379 | 378 | ||
380 | // Manipulate columns data | 379 | // Manipulate columns data |
381 | foreach ($data['cols'] as &$value) { | 380 | foreach ($data['linksToDisplay'] as &$value) { |
382 | foreach ($value as &$value2) { | 381 | $value['formatedDescription'] .= ' ಠ_ಠ'; |
383 | $value2['formatedDescription'] .= ' ಠ_ಠ'; | ||
384 | } | ||
385 | } | 382 | } |
386 | 383 | ||
387 | // Add plugin content at the end of each link | 384 | // Add plugin content at the end of each link |
388 | foreach ($data['cols'] as &$value) { | 385 | foreach ($data['linksToDisplay'] as &$value) { |
389 | foreach ($value as &$value2) { | 386 | $value['link_plugin'][] = 'DEMO'; |
390 | $value2['link_plugin'][] = 'DEMO'; | ||
391 | } | ||
392 | } | 387 | } |
393 | 388 | ||
394 | return $data; | 389 | return $data; |
@@ -452,8 +447,7 @@ function hook_demo_plugin_render_feed($data) | |||
452 | foreach ($data['links'] as &$link) { | 447 | foreach ($data['links'] as &$link) { |
453 | if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) { | 448 | if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) { |
454 | $link['description'] .= ' - ATOM Feed' ; | 449 | $link['description'] .= ' - ATOM Feed' ; |
455 | } | 450 | } elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) { |
456 | elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) { | ||
457 | $link['description'] .= ' - RSS Feed'; | 451 | $link['description'] .= ' - RSS Feed'; |
458 | } | 452 | } |
459 | } | 453 | } |