Create a service for caption calculation

Created on 9 December 2024, about 1 month ago

Caption calculation has a somewhat complex logic on it and it lives in a theme function "_glightbox_formatter_get_caption", it would be more flexible if we had a service for it so anyone can really implement/decorate their own captions without adding too much burden to this module, i.e. if the video one I've implemented here https://www.drupal.org/project/glightbox_media_video/issues/3492655 📌 Allow caption to use title and description for remote video Active had to duplicate this code.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain pcambra Asturies

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @pcambra
  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia

    Hi pcambra, sounds good to me, I will have a look this and move calculation of caption in separate class/service. This GLightbox module was forked from Colorbox module, which is rewritten from D7 module. So it's old fashion legacy.

Production build 0.71.5 2024