Extend civictheme_get_field_value to support File and Media

Created on 21 August 2024, 8 months ago

Problem/Motivation

Currently the civictheme_get_field_value utility function is limited to basic field type (Boolean, Integer, String, etc...) however it would be handy if it also included support for Media assets, possibly leveraging off the existing civictheme_media_image_get_url function.

Remaining tasks

Extend the function civictheme_get_field_value located in /includes/utilities.inc to support the Media Field Type.

Returned value could be:
- a loaded Media asset
- URL to the primary source file
- Image processed with an image style

Unsure as to which would be the best approach, happy to discuss.

Feature request
Status

Active

Version

1.8

Component

Code

Created by

🇦🇺Australia Toby Wild

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

Comments & Activities

Production build 0.71.5 2024