Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Media type form field for widget doesn’t take the values specified here https://siteorigin.com/docs/widgets-bundle/form-building/form-fields/ . “all” option is “*” and it takes file mime types, so for example for pdf you can just type application/pdf. That data must be hooked up to a wrong variable in wp core inside that media popup xhr.
Hi Roman,
I’m unable to replicate what you’ve described. Could you send me a copy of your code so I can check over it?
For reference, application/pdf doesn’t, or rather in your case, shouldn’t work. There also isn’t an all option.
That’s my point. According to the documentation “all” should fetch all of the library items, while it gives none. Instead “*” returns all file types. I’m extending SiteOrigin_Widget class, exactly like the widgets from the widgets bundle.
I simply checked your core code. You can also simply replicate it by changing “data-library” field inside any widget that has media button in the wp admin.
Hi Roman,
Maybe we’re looking at different documentation – there’s no mention of the word all. To clarify, are you reading this documentation or different documentation?
I stand corrected regarding all working though – that does in fact work. Regardless, it’s not actually mentioned. Is your issue that it’s not mentioned?
Yes! Apologies, my fault, it’s pretty hectic here. Yes. The ‘all’ option came from wp documentation on the media upload button. I thought that you’re using that function to create the media button, but apparently not.