Project

General

Profile

Paste
Download (751 Bytes) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / themes / bootstrap / templates / system / mark.func.php @ 1f623f01

1
<?php
2
/**
3
 * @file
4
 * Stub file for bootstrap_mark().
5
 */
6

    
7
/**
8
 * Returns HTML for a marker for new or updated content.
9
 *
10
 * @param array $variables
11
 *   An associative array containing:
12
 *   - type: Number representing the marker type to display. See MARK_NEW,
13
 *     MARK_UPDATED, MARK_READ.
14
 *
15
 * @return string
16
 *   The constructed HTML.
17
 *
18
 * @see theme_mark()
19
 *
20
 * @ingroup theme_functions
21
 */
22
function bootstrap_mark($variables) {
23
  global $user;
24
  if ($user->uid) {
25
    if ($variables['type'] == MARK_NEW) {
26
      return ' <span class="marker label label-primary">' . t('new') . '</span>';
27
    }
28
    elseif ($variables['type'] == MARK_UPDATED) {
29
      return ' <span class="marker label label-info">' . t('updated') . '</span>';
30
    }
31
  }
32
}