use:
PHP Code:
<?php
for ($i = 0, $n = sizeof($output); $i < $n; $i++) {
if (!str_contains($output[$i]['text'], 'Currently shopping for')) {
$msg_pera = '';
if (strpos($output[$i]['params'], 'messageStackError') > 0) {
$msg_pera = str_replace('messageStackError', 'alert alert-danger alert-dismissable', $output[$i]['params']);
} elseif (strpos($output[$i]['params'], 'messageStackWarning') > 0) {
$msg_pera = str_replace('messageStackWarning', 'alert alert-warning alert-dismissable', $output[$i]['params']);
} elseif (strpos($output[$i]['params'], 'messageStackSuccess') > 0) {
$msg_pera = str_replace('messageStackSuccess', 'alert alert-success alert-dismissable', $output[$i]['params']);
} elseif (strpos($output[$i]['params'], 'messageStackCaution') > 0) {
$msg_pera = str_replace('messageStackCaution', 'alert alert-warning alert-dismissable', $output[$i]['params']);
} else {
$msg_pera = str_replace('messageStackCaution', 'alert alert-info alert-dismissable', $output[$i]['params']);
}
?>
<div <?= $msg_pera; ?>><?= $output[$i]['text']; ?>
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
</div>
<?php
}
}
Bookmarks