- This topic has 3 replies, 2 voices, and was last updated 2 years, 7 months ago by
Alex Kladov.
-
AuthorPosts
-
-
June 21, 2019 at 2:09 pm #9423
devr52ParticipantI have an FEF with a file type field.
It always uses the basic uploader, never the media uploader.
How do I get it to use the media uploader? -
June 26, 2019 at 11:48 pm #9425
Alex KladovParticipantHi @devr51! I was just working on File field myself, so thought I’d chime in.
In Piklist’s Developer Documentation for File (Upload) Field, they state that you need to omit
'basic' => trueunderoptions, if you want to use “WordPress media uploader”, otherwise it will use the “basic uploader”.So if you have something like this:
piklist( 'field', array( 'type' => 'file', 'field' => 'my_upload_field', 'label' => 'Upload Field', 'options' => array( 'basic' => true, // <=== REMOVE THIS, if you want to use WordPress media uploader 'button' => 'Add Image', 'preview_size' => 'medium', ), ) );Change it to this:
piklist( 'field', array( 'type' => 'file', 'field' => 'my_upload_field', 'label' => 'Upload Field', 'options' => array( 'button' => 'Add Image', 'preview_size' => 'medium', ), ) );And it should switch to using “WordPress media uploader”.
-
June 26, 2019 at 11:52 pm #9426
devr52ParticipantYes. I also read that in the documentation and I did exactly that.
It still is only showing the basic uploader, which is exactly why I posted this ticket. It’s not working as documented.-
June 27, 2019 at 1:57 am #9427
Alex KladovParticipantI see, fair enough. It’s definitely possible that it’s an actual bug.
Can you paste your
piklist( 'field', array(...) );code here? Maybe I’ll be able to find something.
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.