Commit 1b252200 authored by webchick's avatar webchick

Issue #2088365 by Cottser, CharuAg, bradklaver, machostache, cs_shadow,...

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.
parent f641db54
......@@ -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),
......
......@@ -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',),
......
......@@ -127,7 +127,7 @@ public function viewElements(FieldItemListInterface $items) {
// Display the date using theme datetime.
$elements[$delta] = array(
'#theme' => 'datetime',
'#theme' => 'time',
'#text' => $formatted_date,
'#html' => FALSE,
'#attributes' => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment