aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/markdown/markdown.php
diff options
context:
space:
mode:
authorkalvn <kalvnthereal@gmail.com>2018-02-01 13:16:58 +0100
committerkalvn <kalvnthereal@gmail.com>2018-02-01 13:16:58 +0100
commit50142efd1b4b826f60b1e5673dba5ccbe26e0108 (patch)
tree6cffd9e5e733e10afcfc3010dbeeb4f08bb32f62 /plugins/markdown/markdown.php
parent499bd43c37a6ee3d13dabe8bdd0bb449ae57122a (diff)
downloadShaarli-50142efd1b4b826f60b1e5673dba5ccbe26e0108.tar.gz
Shaarli-50142efd1b4b826f60b1e5673dba5ccbe26e0108.tar.zst
Shaarli-50142efd1b4b826f60b1e5673dba5ccbe26e0108.zip
Executes daily hooks before creating columns.
Diffstat (limited to 'plugins/markdown/markdown.php')
-rw-r--r--plugins/markdown/markdown.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/markdown/markdown.php b/plugins/markdown/markdown.php
index 1531549d..6b4aabf3 100644
--- a/plugins/markdown/markdown.php
+++ b/plugins/markdown/markdown.php
@@ -70,19 +70,18 @@ function hook_markdown_render_feed($data, $conf)
70 */ 70 */
71function hook_markdown_render_daily($data, $conf) 71function hook_markdown_render_daily($data, $conf)
72{ 72{
73 //var_dump($data);die;
73 // Manipulate columns data 74 // Manipulate columns data
74 foreach ($data['cols'] as &$value) { 75 foreach ($data['linksToDisplay'] as &$value) {
75 foreach ($value as &$value2) { 76 if (!empty($value['tags']) && noMarkdownTag($value['tags'])) {
76 if (!empty($value2['tags']) && noMarkdownTag($value2['tags'])) { 77 $value = stripNoMarkdownTag($value);
77 $value2 = stripNoMarkdownTag($value2); 78 continue;
78 continue;
79 }
80 $value2['formatedDescription'] = process_markdown(
81 $value2['formatedDescription'],
82 $conf->get('security.markdown_escape', true),
83 $conf->get('security.allowed_protocols')
84 );
85 } 79 }
80 $value['formatedDescription'] = process_markdown(
81 $value['formatedDescription'],
82 $conf->get('security.markdown_escape', true),
83 $conf->get('security.allowed_protocols')
84 );
86 } 85 }
87 86
88 return $data; 87 return $data;
@@ -136,7 +135,7 @@ function hook_markdown_render_includes($data)
136 || $data['_PAGE_'] == Router::$PAGE_DAILY 135 || $data['_PAGE_'] == Router::$PAGE_DAILY
137 || $data['_PAGE_'] == Router::$PAGE_EDITLINK 136 || $data['_PAGE_'] == Router::$PAGE_EDITLINK
138 ) { 137 ) {
139 138
140 $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/markdown/markdown.css'; 139 $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/markdown/markdown.css';
141 } 140 }
142 141