<?php

/**
 * @file
 * preprocess-media.php
 *
 * Define all media preprocess HOOKs.
 */

/**
 * Implements hook_preprocess_media().
 */
function naomi_2025_preprocess_media(&$variables) {
  if ($variables['media']->caption) {
    $variables['caption'] = $variables['media']->caption;
  }
}

/**
 * Implements hook_preprocess_media() for image image_photo_gallery.
 */
function naomi_2025_preprocess_media__image__image_photo_gallery(&$variables) {
  if ($variables['media']->image) {
    $variables['image'] = $variables['media']->image;
  }
}
