Skip to content

Instantly share code, notes, and snippets.

@rahularyan
Created October 26, 2017 03:26
Show Gist options
  • Save rahularyan/c19eea01a90291ef1db1e7a95166b2a7 to your computer and use it in GitHub Desktop.
Save rahularyan/c19eea01a90291ef1db1e7a95166b2a7 to your computer and use it in GitHub Desktop.
<?php
// AnsPress upload field.
array(
...
'type' => 'upload',
'upload_options' => array(
'allowed_mimes' => ap_allowed_mimes(), // Or you can allow your own types.
'max_files' => 1, // Numbers of files allowed to upload.
'multiple' => false, // This must be true if you wish to upload multiple files.
'label_deny_type' => __( 'This file type is not allowed to upload.', 'anspress-question-answer' ),
),
...
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment