I'm developing a plugin where users need to be able to upload an image (a payment receipt) to a custom user field. At the time, I'm using a code I found here Extra User Profile Field Upload File / Image and it is working. The problem is I don't want WP Media to show a lot of things, I just want the user to be able to upload a single image without seeing private site information or media and without being able to create something like a gallery.
Please, answer if you have any idea about how doing it. Thank you!
I'm developing a plugin where users need to be able to upload an image (a payment receipt) to a custom user field. At the time, I'm using a code I found here Extra User Profile Field Upload File / Image and it is working. The problem is I don't want WP Media to show a lot of things, I just want the user to be able to upload a single image without seeing private site information or media and without being able to create something like a gallery.
Please, answer if you have any idea about how doing it. Thank you!
You can use ACF to do this.
Example:
$field_arguments = array(
'post_id' => 'user_'.$current_user->ID,
'field_groups' => array(111), // Replace with ACF Group you created
'form' => true,
'uploader' => 'basic', // This is what hides the WP Media Library to the user
'submit_value' => 'Submit'
);