diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2223,23 +2223,20 @@ } /** - * Returns HTML for a marker for new or updated content. + * Prepares variables for mark templates. * - * @param $variables + * Default template: mark.html.twig. + * + * @param array $variables * An associative array containing: * - type: Number representing the marker type to display. See MARK_NEW, * MARK_UPDATED, MARK_READ. */ -function theme_mark($variables) { - $type = $variables['mark_type']; +function template_preprocess_mark(&$variables) { global $user; + $variables['logged_in'] = FALSE; if ($user->uid) { - if ($type == MARK_NEW) { - return ' ' . t('new') . ''; - } - elseif ($type == MARK_UPDATED) { - return ' ' . t('updated') . ''; - } + $variables['logged_in'] = TRUE; } } @@ -2272,20 +2269,23 @@ } /** - * Prepares variables for mark templates. - * - * Default template: mark.html.twig. + * Returns HTML for a marker for new or updated content. * - * @param array $variables + * @param $variables * An associative array containing: * - type: Number representing the marker type to display. See MARK_NEW, * MARK_UPDATED, MARK_READ. */ -function template_preprocess_mark(&$variables) { +function theme_mark($variables) { + $type = $variables['type']; global $user; - $variables['logged_in'] = FALSE; if ($user->uid) { - $variables['logged_in'] = TRUE; + if ($type == MARK_NEW) { + return ' ' . t('new') . ''; + } + elseif ($type == MARK_UPDATED) { + return ' ' . t('updated') . ''; + } } } @@ -3135,7 +3135,8 @@ 'template' => 'tablesort-indicator', ), 'mark' => array( - 'variables' => array('mark_type' => MARK_NEW), + 'variables' => array('type' => MARK_NEW), + 'template' => 'mark', ), 'item_list' => array( 'variables' => array('items' => array(), 'title' => '', 'type' => 'ul', 'attributes' => array()), @@ -3177,7 +3178,6 @@ ), 'mark' => array( 'variables' => array('type' => MARK_NEW), - 'template' => 'mark', ), 'item_list' => array( 'variables' => array('items' => array(), 'title' => '', 'type' => 'ul', 'attributes' => array()),