diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index e6326d8..e5acbce 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -22,8 +22,8 @@
/**
* @defgroup content_flags Content markers
* @{
- * Markers used by theme_mark() and node_mark() to designate content.
- * @see theme_mark(), node_mark()
+ * Markers used by node_mark() to designate recent content.
+ * @see node_mark()
*/
/**
@@ -1840,27 +1840,6 @@ function template_preprocess_tablesort_indicator(&$variables) {
}
/**
- * Returns HTML for a marker for new or updated content.
- *
- * @param $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['status'];
- global $user;
- if ($user->isAuthenticated()) {
- if ($type == MARK_NEW) {
- return ' ' . t('new') . '';
- }
- elseif ($type == MARK_UPDATED) {
- return ' ' . t('updated') . '';
- }
- }
-}
-
-/**
* Preprocesses variables for theme_item_list().
*
* @param array $variables
@@ -2715,9 +2694,6 @@ function drupal_common_theme() {
'variables' => array('style' => NULL),
'template' => 'tablesort-indicator',
),
- 'mark' => array(
- 'variables' => array('status' => MARK_NEW),
- ),
'item_list' => array(
'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL),
),
diff --git a/core/modules/comment/templates/comment.html.twig b/core/modules/comment/templates/comment.html.twig
index 570448f..bfb4cac 100644
--- a/core/modules/comment/templates/comment.html.twig
+++ b/core/modules/comment/templates/comment.html.twig
@@ -69,7 +69,7 @@
the server which comments are new for the user. Rendering the final
"new" indicator here would break the render cache.
#}
-
+
{{ title }}
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index 03387f8..d9bda0d 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -237,17 +237,19 @@ function node_admin_nodes() {
);
foreach ($nodes as $node) {
$l_options = $node->language()->id != Language::LANGCODE_NOT_SPECIFIED && isset($languages[$node->language()->id]) ? array('language' => $languages[$node->language()->id]) : array();
- $mark = array(
- '#theme' => 'mark',
- '#status' => node_mark($node->id(), $node->getChangedTime()),
- );
$form['nodes'][$node->id()]['title'] = array(
'#type' => 'link',
'#title' => $node->label(),
'#href' => 'node/' . $node->id(),
'#options' => $l_options,
- '#suffix' => ' ' . drupal_render($mark),
);
+ $mark_type = node_mark($node->id(), $node->getChangedTime());
+ if ($mark_type == MARK_NEW) {
+ $form['nodes'][$node->id()]['title']['#suffix'] = ' ' . t('new') . '';
+ }
+ elseif ($mark_type == MARK_UPDATED) {
+ $form['nodes'][$node->id()]['title']['#suffix'] = ' ' . t('updated') . '';
+ }
$form['nodes'][$node->id()]['type'] = array(
'#markup' => check_plain(node_get_type_label($node)),
);
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 79c7b44..d7e947a 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -1177,11 +1177,13 @@ function theme_node_recent_content($variables) {
$output = '';
$output .= l($node->label(), 'node/' . $node->id());
- $mark = array(
- '#theme' => 'mark',
- '#status' => node_mark($node->id(), $node->getChangedTime()),
- );
- $output .= drupal_render($mark);
+ $mark_type = node_mark($node->id(), $node->getChangedTime());
+ if ($mark_type == MARK_NEW) {
+ $output .= ' ' . t('new') . '';
+ }
+ elseif ($mark_type == MARK_UPDATED) {
+ $output .= ' ' . t('updated') . '';
+ }
$output .= '
';
$username = array(
'#theme' => 'username',
diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css
index c6ed012..0d69357 100644
--- a/core/modules/system/css/system.theme.css
+++ b/core/modules/system/css/system.theme.css
@@ -77,7 +77,12 @@ h4.label {
.form-type-checkbox .description {
margin-left: 2.4em;
}
-.marker,
+.mark--new,
+.mark--updated,
+.mark--outdated {
+ background-color: transparent;
+ color: #e00;
+}
.form-required {
color: #e00;
}
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index eeef432..ed4b354 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -87,19 +87,22 @@ function tracker_page($account = NULL, $set_title = FALSE) {
}
}
- $mark_build = array(
- '#theme' => 'mark',
- '#status' => node_mark($node->id(), $node->getChangedTime()),
- );
-
$row = array(
'type' => check_plain(node_get_type_label($node)),
- 'title' => array('data' => l($node->getTitle(), 'node/' . $node->id()) . ' ' . drupal_render($mark_build)),
+ 'title' => array('data' => l($node->getTitle(), 'node/' . $node->id())),
'author' => array('data' => array('#theme' => 'username', '#account' => $node->getAuthor())),
'replies' => array('class' => array('replies'), 'data' => $comments),
'last updated' => array('data' => t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_activity)))),
);
+ $mark_type = node_mark($node->id(), $node->getChangedTime());
+ if ($mark_type == MARK_NEW) {
+ $row['title']['data'] .= ' ' . t('new') . '';
+ }
+ elseif ($mark_type == MARK_UPDATED) {
+ $row['title']['data'] .= ' ' . t('updated') . '';
+ }
+
// Adds extra RDFa markup to the $row array if the RDF module is enabled.
if (\Drupal::moduleHandler()->moduleExists('rdf')) {
$mapping = rdf_get_mapping('node', $node->getType());