Skip to content

Auto-detect if image block term meta binding should be interpreted as an attachment ID or URL #5

@cr0ybot

Description

@cr0ybot

I'd like to give the user the ability to select term meta corresponding to an image in #4, but requiring them to know if the meta value is saved as an attachment ID or not might be asking too much. Instead, we should attempt to auto-detect the meta value format:

  1. If value is numeric, try wp_get_attachment_image_url()
  2. If value is a URL, use it directly

What other ways could an image be stored in term meta?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions