function heartbeat_get_available_tags in Heartbeat 6.4
Function to get the heartbeat tags
4 calls to heartbeat_get_available_tags()
- HeartbeatMessageTemplate::__construct in includes/
heartbeatmessagetemplate.inc - Constructor
- heartbeat_autocomplete_tag in ./
heartbeat.admin.inc - Page callback for heartbeat tag autocomplete
- heartbeat_edit_tags in ./
heartbeat.module - Edit (add, update) the heartbeat tags
- heartbeat_message_load in ./
heartbeat.module - Fetches the translatable message for corresponding action
File
- ./
heartbeat.module, line 1516
Code
function heartbeat_get_available_tags($hid = 0) {
$tags = array();
if ($hid !== 0) {
$result = db_query("SELECT * FROM {heartbeat_tags} ht INNER JOIN {heartbeat_mt} hmt ON ht.htid = hmt.htid WHERE hid = %d", $hid);
}
else {
$result = db_query("SELECT * FROM {heartbeat_tags} ht INNER JOIN {heartbeat_mt} hmt ON ht.htid = hmt.htid");
}
while ($row = db_fetch_object($result)) {
$tags[$row->htid] = $row->name;
}
return $tags;
}