summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-08-24 13:46:18 -0700
committerwebchick2014-08-24 13:46:18 -0700
commit1b252200a1640ee8e3201745b1806e8d7bd00abb (patch)
tree49488e96820e333908abdfd60ab0df6d23646195
parentf641db542a5ecb578a4924cec6c8871069c11cdd (diff)
Issue #2088365 by Cottser, CharuAg, bradklaver, machostache, cs_shadow, visabhishek, sriharsha.uppuluri, grisendo, undertext, naveenvalecha | nod_: Fixed Wrong name for datetime.html.twig should be time.html.twig.
-rw-r--r--core/includes/theme.inc10
-rw-r--r--core/modules/aggregator/aggregator.theme.inc2
-rw-r--r--core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php2
-rw-r--r--core/modules/system/templates/time.html.twig (renamed from core/modules/system/templates/datetime.html.twig)0
4 files changed, 8 insertions, 6 deletions
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 015b517..08ad960 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -826,7 +826,9 @@ function drupal_render_inline_template(&$element) {
*/
/**
- * Preprocess variables for theme_datetime().
+ * Prepares variables for time templates.
+ *
+ * Default template: time.html.twig.
*
* @param array $variables
* An associative array possibly containing:
@@ -834,7 +836,7 @@ function drupal_render_inline_template(&$element) {
* - timestamp:
* - text:
*/
-function template_preprocess_datetime(&$variables) {
+function template_preprocess_time(&$variables) {
// Format the 'datetime' attribute based on the timestamp.
// @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
if (!isset($variables['attributes']['datetime']) && isset($variables['timestamp'])) {
@@ -2350,9 +2352,9 @@ function drupal_common_theme() {
'render element' => 'elements',
'template' => 'region',
),
- 'datetime' => array(
+ 'time' => array(
'variables' => array('timestamp' => NULL, 'text' => NULL, 'attributes' => array(), 'html' => FALSE),
- 'template' => 'datetime',
+ 'template' => 'time',
),
'status_messages' => array(
'variables' => array('display' => NULL),
diff --git a/core/modules/aggregator/aggregator.theme.inc b/core/modules/aggregator/aggregator.theme.inc
index 1335ee6..605025c 100644
--- a/core/modules/aggregator/aggregator.theme.inc
+++ b/core/modules/aggregator/aggregator.theme.inc
@@ -116,7 +116,7 @@ function template_preprocess_aggregator_summary_item(&$variables) {
),
));
$variables['age'] = array(
- '#theme' => 'datetime',
+ '#theme' => 'time',
'#attributes' => array(
'datetime' => format_date($item->getPostedTime(), 'html_datetime', '', 'UTC'),
'class' => array('feed-item-age',),
diff --git a/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php b/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php
index 65167b3..f983c8d 100644
--- a/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php
+++ b/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php
@@ -127,7 +127,7 @@ class DateTimeDefaultFormatter extends FormatterBase implements ContainerFactory
// Display the date using theme datetime.
$elements[$delta] = array(
- '#theme' => 'datetime',
+ '#theme' => 'time',
'#text' => $formatted_date,
'#html' => FALSE,
'#attributes' => array(
diff --git a/core/modules/system/templates/datetime.html.twig b/core/modules/system/templates/time.html.twig
index 183b834..183b834 100644
--- a/core/modules/system/templates/datetime.html.twig
+++ b/core/modules/system/templates/time.html.twig