Skip to content

Commit

Permalink
Version 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzeeb3 committed Jun 17, 2021
1 parent aef89df commit 0b1c8a1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file, formatted via [this recommendation](https://keepachangelog.com/).

## [1.2.2] - 2021-06-17
* Fix - PHP notices when invalid files are uploaded.
* Enhancement - Replace jquery.ready with recommended syntax.

## [1.2.1] - 2021-02-24
* Fix - Correctly load composer autoload.
* Enhancement - Add .eps extension to the default list.
Expand Down
4 changes: 2 additions & 2 deletions file-upload-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: File Upload Types
* Description: Easily allow WordPress to accept and upload any file type extension or MIME type, including custom file types.
* Version: 1.2.1
* Version: 1.2.2
* Author: WPForms
* Author URI: https://wpforms.com
* Text Domain: file-upload-types
Expand Down Expand Up @@ -59,7 +59,7 @@ function file_upload_types_deactivate_msg() {
*/
define( 'FILE_UPLOAD_TYPES_PLUGIN_FILE', __FILE__ );
define( 'FILE_UPLOAD_TYPES_PLUGIN_PATH', dirname( __FILE__ ) );
define( 'FILE_UPLOAD_TYPES_VERSION', '1.2.1' );
define( 'FILE_UPLOAD_TYPES_VERSION', '1.2.2' );

require_once __DIR__ . '/vendor/autoload.php';

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "file-upload-types",
"description": "Manage the types of files that can be uploaded to your WordPress site.",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "",
"repository": {
"type": "git",
Expand Down
14 changes: 9 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: wpforms, smub, jaredatch, slaFFik, sanzeeb3
Tags: files, upload, file upload, mime, attachments
Requires at least: 4.9
Tested up to: 5.7
Stable tag: 1.2.1
Stable tag: 1.2.2
Requires PHP: 5.6

Easily allow WordPress to accept and upload any file type extension or MIME type, including custom file types.
Expand Down Expand Up @@ -80,10 +80,14 @@ Visit <a href="http://www.wpbeginner.com/?utm_source=wprepo&utm_medium=link&utm_

== Changelog ==

= 1.2.1 - 2021-02-24 =
* Fix - Correctly load composer autoload.
* Enhancement - Add .eps extension to the default list.
* Enhancement - Add 'application/pdf' mime type to .ai extension.
= 1.2.2 - 2021-06-17 =
* Fix - PHP notices when invalid files are uploaded.
* Enhancement - Replace jquery.ready with recommended syntax.

= 1.2.1 - 2021-02-24 =
* Fix - Correctly load composer autoload.
* Enhancement - Add .eps extension to the default list.
* Enhancement - Add 'application/pdf' mime type to .ai extension.

= 1.2.0 - 2020-09-15 =
* Feature - Multiple MIME types support for a single extension.
Expand Down
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function fut_get_available_file_types() {
// Serve v2 for new installs, and for old installs having multiple mime types support enabled.
$file = ! get_option( 'file_upload_types' ) || 'enabled' === get_option( 'file_upload_types_multiple_mimes' ) ? 'file-types-list-v2' : 'file-types-list';

$mime_types_serialized = trim( file_get_contents( dirname( FILE_UPLOAD_TYPES_PLUGIN_FILE ) . '/assets/' . $file . '.json' ) );
$mime_types_serialized = trim( file_get_contents( dirname( FILE_UPLOAD_TYPES_PLUGIN_FILE ) . '/assets/' . $file . '.json' ) ); //phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents

return json_decode( $mime_types_serialized, true );
}
Expand Down

0 comments on commit 0b1c8a1

Please sign in to comment.