We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, you can enter an audio file into an image field because there is no way to validate whether the input is of the correct MIME Type.
Perhaps, it would be best to be able to define the input type in the code. I want users to enter just images (and not audio/video) into this field:
<?php $mb->the_field('imgurl'); ?> <?php $mediaAccess->setGroupName('imagepost')->setInsertButtonLabel('Insert'); ?> <p> <?php echo $mediaAccess->getField(array( 'name' => $mb->get_the_name(), 'value' => $mb->get_the_value())); ?> <?php echo $mediaAccess->getButton(array('label' => 'Add Image from Library')); ?> </p>
Maybe it is possible to leverage the post_mime_type filter of the Wordpress Media Library.
Also, would it be able to acquire the corresponding information for the file (alt, title, description)?
Cheers.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, you can enter an audio file into an image field because there is no way to validate whether the input is of the correct MIME Type.
Perhaps, it would be best to be able to define the input type in the code. I want users to enter just images (and not audio/video) into this field:
Maybe it is possible to leverage the post_mime_type filter of the Wordpress Media Library.
Also, would it be able to acquire the corresponding information for the file (alt, title, description)?
Cheers.
The text was updated successfully, but these errors were encountered: