WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to display $_FILES in wp-admin, and I've been using add_filter and apply_filter, but it does not seem to show the $_FILES array values. My goal is to show the values in $_FILES so I can upload it to a specified directory (But this is going to be in the future).

Upload Screen Meta Box

function upload_screen() { 
  echo "<br>";
  echo 'Upload Files<input type="file" name="" /><br>';

The next function should return the file array (this is where the problem lies). So I tried using add_filter, but does not seem to work.

File Upload Function but return $file array for now.

function demo_fileupload($file) {
  return $file;

Add Filter

share|improve this question

In order to show $_FILES or $_POST, you will need to create a sumbenu_page under the post_type. Then, you will be able to manipulate $_FILES and $_POST in whichever way you want.

This means that upload_screen() function should be a submenu page.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.