function alerts_menu_handle_replacement_pattern
Search API
7.x alerts.module | alerts_menu_handle_replacement_pattern($str) |
6.x alerts.module | alerts_menu_handle_replacement_pattern($str) |
implements hook_menu_handle_replacement_pattern
File
- modules/
alerts/ alerts.module, line 125 - module file for Alerts
Code
function alerts_menu_handle_replacement_pattern($str) {
if (strstr($str, "%ALERTS_ADVISEE_ALERTS_COUNT%")) {
// Get our count.
$alert_counts = fp_get_alert_count_by_type();
$c = intval($alert_counts ['alerts']['alert']['unread']);
$x = "";
if ($c > 0) {
$x .= " ($c)";
}
$str = str_replace("%ALERTS_ADVISEE_ALERTS_COUNT%", $x, $str);
}
return $str;
}