original_string: public function file_error_message( $key ) {
  		if ( $this->file_info( $key ) ) {
  			return '';
  		} elseif ( ! isset( $_FILES[ $key ] ) ) {
  			return $this->__( 'File is not specified.' );
  		} else {
  			switch ( $_FILES[ $key ]['error'] ) {
  				case UPLOAD_ERR_FORM_SIZE:
  				case UPLOAD_ERR_INI_SIZE:
  					return $this->__( 'Uploaded file size exceeds allowed limit.' );
  					break;
  				default:
  					return $this->__( 'Failed to upload' );
  					break;
  			}
  		}
  	}
code: public function file_error_message( $key ) {
  		if ( $this->file_info( $key ) ) {
  			return '';
  		} elseif ( ! isset( $_FILES[ $key ] ) ) {
  			return $this->__( 'File is not specified.' );
  		} else {
  			switch ( $_FILES[ $key ]['error'] ) {
  				case UPLOAD_ERR_FORM_SIZE:
  				case UPLOAD_ERR_INI_SIZE:
  					return $this->__( 'Uploaded file size exceeds allowed limit.' );
  					break;
  				default:
  					return $this->__( 'Failed to upload' );
  					break;
  			}
  		}
  	}
code_tokens: public function file_error_message ( $ key ) { if ( $ this -> file_info ( $ key ) ) { return '' ; } elseif ( ! isset ( $ _FILES [ $ key ] ) ) { return $ this -> __ ( 'File is not specified.' ) ; } else { switch ( $ _FILES [ $ key ] [ 'error' ] ) { case UPLOAD_ERR_FORM_SIZE : case UPLOAD_ERR_INI_SIZE : return $ this -> __ ( 'Uploaded file size exceeds allowed limit.' ) ; break ; default : return $ this -> __ ( 'Failed to upload' ) ; break ; } } }
docstring: Get file upload error message
  
  @param string $key
  
  @return string
docstring_tokens: Get file upload error message