Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cr0ybot opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cr0ybot
Copy link
Owner

cr0ybot commented Dec 12, 2024

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?

@cr0ybot cr0ybot self-assigned this Dec 12, 2024
@cr0ybot cr0ybot added the enhancement New feature or request label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant