Jake Vanderwerf
2025-11-10 e9967fa22781d922ba4eb8fb44fe72d200ac4b14
inc/helpers/media.php
@@ -9,13 +9,13 @@
    ?>
    <dialog class="gallery" aria-modal="true" aria-label="Image Gallery">
      <div class="wrap">
         <button type="button" class="cancel" aria-label="Close Gallery"> <?= jvbIcon('close') ?></button>
         <button type="button" class="cancel" aria-label="Close Gallery"> <?= jvbIcon('x') ?></button>
         <button class="nav prev row" aria-label="Previous image">
            <?= jvbIcon('prev') ?>
            <?= jvbIcon('caret-left') ?>
         </button>
         <button class="nav next row" aria-label="Next image">
            <?= jvbIcon('next') ?>
            <?= jvbIcon('caret-right') ?>
         </button>
         <div class="content row">
@@ -32,31 +32,3 @@
    </dialog>
    <?php
}
function jvbRenderImageForm(int $attachmentId) {
   if (!$attachmentId) return '';
   $url = wp_get_attachment_image_url($attachmentId, 'medium');
   $title = get_the_title($attachmentId);
   $alt = get_post_meta($attachmentId, '_wp_attachment_image_alt', true);
   $caption = wp_get_attachment_caption($attachmentId);
   ob_start();
   ?>
   <div class="upload-item existing" data-attachment-id="<?= $attachmentId ?>">
      <div class="preview">
         <img src="<?= esc_url($url) ?>" alt="<?= esc_attr($alt) ?>">
         <div class="overlay">
            <div class="actions">
               <button type="button" class="remove" title="Remove">
                  <span class="screen-reader-text">Remove image</span>
                  ×
               </button>
            </div>
         </div>
      </div>
      <?= jvbImageMeta() ?>
   </div>
   <?php
   return ob_get_clean();
}