diff --git a/core/includes/theme.inc b/core/includes/theme.inc index ed5bd58..a0265ba 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -997,7 +997,7 @@ function theme_disable($theme_list) { */ /** - * Preprocess variables for theme_datetime(). + * Preprocess variables for theme_time(). * * @param array $variables * An associative array possibly containing: @@ -1005,7 +1005,7 @@ function theme_disable($theme_list) { * - 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'])) { @@ -2596,9 +2596,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 c65a3cf..f2f909b 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/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php index c26e8be..7b78817 100644 --- a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php +++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldFormatter/DateTimeDefaultFormatter.php @@ -123,7 +123,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( diff --git a/core/modules/system/templates/datetime.html.twig b/core/modules/system/templates/datetime.html.twig deleted file mode 100644 index 25ef788..0000000 --- a/core/modules/system/templates/datetime.html.twig +++ /dev/null @@ -1,29 +0,0 @@ -{# -/** - * @file - * Default theme implementation for a date / time element. - * - * Available variables - * - timestamp: (optional) A UNIX timestamp for the datetime attribute. If the - * datetime cannot be represented as a UNIX timestamp, use a valid datetime - * attribute value in attributes.datetime. - * - text: (optional) The content to display within the