// ignore anything in a code block
$data = preg_replace('/\[code\](.*?)\[\/code\]/sm', '', $data);
- $tags = array();
+ $tags = [];
$pattern = '/\W\#([^\[].*?)[\s\'".,:;\?!\[\]\/]/ism';
if (preg_match_all($pattern, $data, $matches)) {
TERM_OBJ_POST
);
if (!DBM::is_result($r)) {
- return array();
+ return [];
}
return tag_calc($r);
}
$tpl = get_markup_template('tagblock_widget.tpl');
- $o = replace_macros($tpl, array(
+ $o = replace_macros($tpl, [
'$title' => t('Tags'),
'$tags' => $tags
- ));
+ ]);
}
return $o;
}
*/
function tag_calc($arr)
{
- $tags = array();
+ $tags = [];
$min = 1e9;
$max = -1e9;
$x = 0;
if (!$arr) {
- return array();
+ return [];
}
foreach ($arr as $rr) {