<?php

/**
 * @file
 * Functions to support theming content in the Toc GA theme.
 */

/**
 * Preprocess hook for node__article().
 */
function toc_ga_preprocess_node__article(&$vars) {
  // The entity.
  $entity = $vars['node'];
  $cats = _tm_misc_get_field_content($entity, 'field_blog_category');
  $tags = _tm_misc_format_tags($cats);
  $published_date = _tm_misc_format_date_overridden($entity, 'toc_long', 'created');
  $changed_date = _tm_misc_format_date_overridden($entity, 'toc_long', 'changed', '');
  $vars['pub_date'] = "Published on: " . $published_date;
  $vars['changed_date'] = "Last updated: " . $changed_date;
  $vars['tags'] = $tags;
}