aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/demo_plugin/demo_plugin.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-10-17 08:50:18 +0200
committerGitHub <noreply@github.com>2016-10-17 08:50:18 +0200
commit06eec9bf764662cd328627247a1f43e4abd3c5ad (patch)
treefd66a3e1cb4cd93aa80b6f04c43958623140a008 /plugins/demo_plugin/demo_plugin.php
parentbb70e690598d270951148e003a4dc253b05868b4 (diff)
parent7fde6de1212323418401c15efba06026c704ca87 (diff)
downloadShaarli-06eec9bf764662cd328627247a1f43e4abd3c5ad.tar.gz
Shaarli-06eec9bf764662cd328627247a1f43e4abd3c5ad.tar.zst
Shaarli-06eec9bf764662cd328627247a1f43e4abd3c5ad.zip
Merge pull request #659 from ArthurHoaro/plugin-errors
New init function for plugins, supports errors reporting
Diffstat (limited to 'plugins/demo_plugin/demo_plugin.php')
-rw-r--r--plugins/demo_plugin/demo_plugin.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/demo_plugin/demo_plugin.php b/plugins/demo_plugin/demo_plugin.php
index 18834e53..7335c9d4 100644
--- a/plugins/demo_plugin/demo_plugin.php
+++ b/plugins/demo_plugin/demo_plugin.php
@@ -15,6 +15,23 @@
15 */ 15 */
16 16
17/** 17/**
18 * Initialization function.
19 * It will be called when the plugin is loaded.
20 * This function can be used to return a list of initialization errors.
21 *
22 * @param $conf ConfigManager instance.
23 *
24 * @return array List of errors (optional).
25 */
26function demo_plugin_init($conf)
27{
28 $conf->get('toto', 'nope');
29
30 $errors[] = 'This a demo init error.';
31 return $errors;
32}
33
34/**
18 * Hook render_header. 35 * Hook render_header.
19 * Executed on every page redering. 36 * Executed on every page redering.
20 * 37 *