fix function return values
remove old WPML code
add action hook before save
remove last of WPML code
Fix "indexOf" JS error when upload is closed without uploading.