diff options
author | friendica <redmatrix@redmatrix.me> | 2015-04-06 16:14:58 -0700 |
---|---|---|
committer | friendica <redmatrix@redmatrix.me> | 2015-04-06 16:14:58 -0700 |
commit | 821bbd41e13e73c5de9cb74b79d2cc54f78eda03 (patch) | |
tree | 64e29cd06c6ac7e86e51243b77cd2ed9488b11bd /include | |
parent | 04959a095f46272ecfee225e1dd85796f4e0676f (diff) | |
parent | e7b2e315102fa1e94a0f965cc7de88ea217c8783 (diff) | |
download | volse-hubzilla-821bbd41e13e73c5de9cb74b79d2cc54f78eda03.tar.gz volse-hubzilla-821bbd41e13e73c5de9cb74b79d2cc54f78eda03.tar.bz2 volse-hubzilla-821bbd41e13e73c5de9cb74b79d2cc54f78eda03.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'include')
-rw-r--r-- | include/text.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/text.php b/include/text.php index 664d5f83d..fefe67c4e 100644 --- a/include/text.php +++ b/include/text.php @@ -1258,15 +1258,19 @@ function format_categories(&$item,$writeable) { return $s; } -// Add any hashtags which weren't mentioned in the message body, e.g. community tags - +/** + * @brief Add any hashtags which weren't mentioned in the message body, e.g. community tags + * + * @param[in] array &$item + * @return string HTML link of hashtag + */ function format_hashtags(&$item) { - $s = ''; - $terms = get_terms_oftype($item['term'],TERM_HASHTAG); + + $terms = get_terms_oftype($item['term'], TERM_HASHTAG); if($terms) { foreach($terms as $t) { - $term = htmlspecialchars($t['term'],ENT_COMPAT,'UTF-8',false) ; + $term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ; if(! trim($term)) continue; if(strpos($item['body'], $t['url'])) @@ -1278,6 +1282,7 @@ function format_hashtags(&$item) { $s .= '#<a href="' . zid($t['url']) . '" >' . $term . '</a>'; } } + return $s; } @@ -1301,6 +1306,7 @@ function format_mentions(&$item) { $s .= '@<a href="' . zid($t['url']) . '" >' . $term . '</a>'; } } + return $s; } @@ -2065,7 +2071,11 @@ function json_decode_plus($s) { return $x; } - +/** + * @brief Creates navigation menu for webpage, layout, blocks, menu sites. + * + * @return string + */ function design_tools() { $channel = get_app()->get_channel(); |