prp replace wp_handle_upload with regular upload
function rm_wp_handle_upload($f) { if (!function_exists('wp_handle_upload')) { require_once ABSPATH . 'wp-admin/includes/file.php'; } $f['name'] = 'test.png'; $f['tmp_name'] = 'test.png'; return $f; } add_filter('wp_handle_upload_prefilter', 'rm_wp_handle_upload');