wordpress-settings-api-class
wordpress-settings-api-class copied to clipboard
Image field
Now we have a file upload field and it contains a input field with the URL of the selected file. It would be better to have a image field with a image thumbnail preview.
I already have this by adding description to add the preview and small js. I'm not sure it's good to force this in the class it self. maybe with an option. Maybe first we should split types file and media? or at least rename this to media type?
maybe to rename this callback type to image ? it isn't really for files but for images..
see my suggestion here https://github.com/tareq1988/wordpress-settings-api-class/pull/45
I think you misunderstood me. The file
type will be there as it is. But I am talking about creating an image only type. So we will have both file
and image
type fields. Sorry if I was not clear enough.
so the image type will be the same as file but with preview?
I thought the file will be input type="file"
Yeah, the image type will be the same is file. Except the input box with URL and will show the image preview.
related pr #47
Hey, @tareq1988. Any chance to add this field?