User Submitted Posts - Version 20190426

Version Description

To upgrade User Submitted Posts, remove the old version and replace with the new version. Or just click "Update" from the Plugins screen and let WordPress do it for you automatically.

Important! The /custom/ directory is deprecated. If you are using a custom form template, please move it to /wp-content/your-theme/usp/. For more information, check out the "Custom Submission Form" section under Installation.

Note: uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database. Submitted posts are NOT removed if you deactivate the plugin, reset default options, or uninstall the plugins; that is, all submitted posts must be removed manually.

Download this release

Release Info

Developer specialk
Plugin Icon 128x128 User Submitted Posts
Version 20190426
Comparing to
See all releases

Code changes from version 20190312 to 20190426

Files changed (2) hide show
  1. readme.txt +7 -2
  2. user-submitted-posts.php +4 -4
readme.txt CHANGED
@@ -10,8 +10,8 @@ Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
  Tested up to: 5.1
13
- Stable tag: 20190312
14
- Version: 20190312
15
  Requires PHP: 5.3
16
  Text Domain: usp
17
  Domain Path: /languages
@@ -709,6 +709,11 @@ Links, tweets and likes also appreciated. Thanks! :)
709
  If you like USP, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/user-submitted-posts/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
710
 
711
 
 
 
 
 
 
712
  **20190312**
713
 
714
  * Adds automatic Urdu translation
10
  Contributors: specialk
11
  Requires at least: 4.1
12
  Tested up to: 5.1
13
+ Stable tag: 20190426
14
+ Version: 20190426
15
  Requires PHP: 5.3
16
  Text Domain: usp
17
  Domain Path: /languages
709
  If you like USP, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/user-submitted-posts/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you!
710
 
711
 
712
+ **20190426**
713
+
714
+ * Adds check that uploaded images are in fact images (Thanks to Matthias)
715
+ * Tests on WordPress 5.1 and 5.2 (beta)
716
+
717
  **20190312**
718
 
719
  * Adds automatic Urdu translation
user-submitted-posts.php CHANGED
@@ -10,8 +10,8 @@
10
  Contributors: specialk
11
  Requires at least: 4.1
12
  Tested up to: 5.1
13
- Stable tag: 20190312
14
- Version: 20190312
15
  Requires PHP: 5.3
16
  Text Domain: usp
17
  Domain Path: /languages
@@ -40,7 +40,7 @@ if (!defined('ABSPATH')) die();
40
 
41
 
42
  define('USP_WP_VERSION', '4.1');
43
- define('USP_VERSION', '20190312');
44
  define('USP_PLUGIN', esc_html__('User Submitted Posts', 'usp'));
45
  define('USP_PATH', plugin_basename(__FILE__));
46
 
@@ -948,7 +948,7 @@ function usp_attach_images($post_id, $newPost, $files, $file_count) {
948
 
949
  $file = file_exists($file) ? usp_unique_filename($file) : $file;
950
 
951
- $bytes = file_put_contents($file, $file_local);
952
 
953
  $file_type = isset($wp_filetype['type']) ? $wp_filetype['type'] : null;
954
 
10
  Contributors: specialk
11
  Requires at least: 4.1
12
  Tested up to: 5.1
13
+ Stable tag: 20190426
14
+ Version: 20190426
15
  Requires PHP: 5.3
16
  Text Domain: usp
17
  Domain Path: /languages
40
 
41
 
42
  define('USP_WP_VERSION', '4.1');
43
+ define('USP_VERSION', '20190426');
44
  define('USP_PLUGIN', esc_html__('User Submitted Posts', 'usp'));
45
  define('USP_PATH', plugin_basename(__FILE__));
46
 
948
 
949
  $file = file_exists($file) ? usp_unique_filename($file) : $file;
950
 
951
+ if (stripos($ext, 'php') === false) $bytes = file_put_contents($file, $file_local);
952
 
953
  $file_type = isset($wp_filetype['type']) ? $wp_filetype['type'] : null;
954