-
Notifications
You must be signed in to change notification settings - Fork 183
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
Saving URL or attachment_id on file/image fields #48
Comments
but it also means it must use the media uploader. you won't be able to use external url. |
For external url, you can use the text input anyway. |
yes so maybe i dont understand what the ticket is about. adding another field that will use attachment id? |
No, the existing file field saves the URL, from now it'll save the attachment id. Right now you can copy paste external urls, but it doesn't have to be a |
I use the file field so user can use the media uploader or use a link. i dont want a text field here. |
Just by way of a plus one... saving the I want to allow users to upload one file (it's a default fallback in case contributors don't set a featured image on posts) because it's an IMAGE I want to be able to interact with it so I can get the thumb size, medium size, etc etc... |
Right now we are saving attachment URLs in the option. Wouldn't it be better to save attachment ids instead?
So if its a file, we can use
wp_get_attachment_url()
. If its an image, we could getfull
,thumbnail
,medium
images if we wanted. What do you guys think?Changing to attachment_id will also break the existing forms as users are already fetching URLs and acting on that.
The text was updated successfully, but these errors were encountered: