User Submitted Posts - Version 20210719

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 (and any attached meta data) must be removed manually.

Download this release

Release Info

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

Code changes from version 20210212 to 20210719

library/shortcode-login.php CHANGED
@@ -85,12 +85,12 @@ function usp_login_form() {
85
  </script>
86
  <div id="usp-login" class="usp-login">
87
  <ul class="tabs_login">
88
- <li class="active_tab"><a href="#tab1_login"><?php esc_html_e('Login', 'usp'); ?></a></li>
89
- <li><a href="#tab2_login"><?php esc_html_e('Register', 'usp'); ?></a></li>
90
- <li><a href="#tab3_login"><?php esc_html_e('Forgot?', 'usp'); ?></a></li>
91
  </ul>
92
  <div class="tab_container">
93
- <div id="tab1_login" class="tab_content">
94
 
95
  <?php if ($register) : ?>
96
 
@@ -131,7 +131,7 @@ function usp_login_form() {
131
  </div>
132
  </form>
133
  </div>
134
- <div id="tab2_login" class="tab_content">
135
  <h3><?php esc_html_e('Register for this site!', 'usp'); ?></h3>
136
  <p><?php esc_html_e('Sign up now for the good stuff.', 'usp'); ?></p>
137
  <form method="post" action="<?php echo wp_registration_url(); ?>">
@@ -151,7 +151,7 @@ function usp_login_form() {
151
  </div>
152
  </form>
153
  </div>
154
- <div id="tab3_login" class="tab_content">
155
  <h3><?php esc_html_e('Lose something?', 'usp'); ?></h3>
156
  <p><?php esc_html_e('Enter your username or email to reset your password.', 'usp'); ?></p>
157
  <form method="post" action="<?php echo wp_lostpassword_url(); ?>">
85
  </script>
86
  <div id="usp-login" class="usp-login">
87
  <ul class="tabs_login">
88
+ <li class="tabs_login_1 active_tab"><a href="#tab1_login"><?php esc_html_e('Login', 'usp'); ?></a></li>
89
+ <li class="tabs_login_2"><a href="#tab2_login"><?php esc_html_e('Register', 'usp'); ?></a></li>
90
+ <li class="tabs_login_3"><a href="#tab3_login"><?php esc_html_e('Forgot?', 'usp'); ?></a></li>
91
  </ul>
92
  <div class="tab_container">
93
+ <div id="tab1_login" class="tab1_login tab_content">
94
 
95
  <?php if ($register) : ?>
96
 
131
  </div>
132
  </form>
133
  </div>
134
+ <div id="tab2_login" class="tab2_login tab_content">
135
  <h3><?php esc_html_e('Register for this site!', 'usp'); ?></h3>
136
  <p><?php esc_html_e('Sign up now for the good stuff.', 'usp'); ?></p>
137
  <form method="post" action="<?php echo wp_registration_url(); ?>">
151
  </div>
152
  </form>
153
  </div>
154
+ <div id="tab3_login" class="tab3_login tab_content">
155
  <h3><?php esc_html_e('Lose something?', 'usp'); ?></h3>
156
  <p><?php esc_html_e('Enter your username or email to reset your password.', 'usp'); ?></p>
157
  <form method="post" action="<?php echo wp_lostpassword_url(); ?>">
library/shortcode-misc.php CHANGED
@@ -117,6 +117,8 @@ function usp_display_posts($attr = array(), $content = null) {
117
 
118
  }
119
 
 
 
120
  $submitted_posts = get_posts($args);
121
 
122
  $display_posts = '<ul>';
117
 
118
  }
119
 
120
+ $args = apply_filters('usp_display_posts_args', $args);
121
+
122
  $submitted_posts = get_posts($args);
123
 
124
  $display_posts = '<ul>';
readme.txt CHANGED
@@ -9,9 +9,9 @@ Author URI: https://plugin-planet.com/
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
- Tested up to: 5.7
13
- Stable tag: 20210212
14
- Version: 20210212
15
  Requires PHP: 5.6.20
16
  Text Domain: usp
17
  Domain Path: /languages
@@ -718,6 +718,11 @@ add_filter('usp_recaptcha_querystring', 'usp_recaptcha_querystring');`
718
  Notice where it says `en`, that is the two-character language code you want to replace with your own. Then save changes and done.
719
 
720
 
 
 
 
 
 
721
  **More FAQs**
722
 
723
  Want to read some more FAQs? Check out the [USP FAQs at Perishable Press](https://perishablepress.com/faqs-user-submitted-posts/)
@@ -757,6 +762,16 @@ Links, tweets and likes also appreciated. Thanks! :)
757
  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!
758
 
759
 
 
 
 
 
 
 
 
 
 
 
760
  **20210212**
761
 
762
  * Adds support to change reCaptcha language
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
+ Tested up to: 5.8
13
+ Stable tag: 20210719
14
+ Version: 20210719
15
  Requires PHP: 5.6.20
16
  Text Domain: usp
17
  Domain Path: /languages
718
  Notice where it says `en`, that is the two-character language code you want to replace with your own. Then save changes and done.
719
 
720
 
721
+ **Where can I check out a demo of the USP form?**
722
+
723
+ There is a simplified [USP Demo](https://perishablepress.com/wp/wp-content/online/pages/user-submitted-posts-demo.html) at Perishable Press. Note the demo form is non-functional, just there to give you a general idea. The actual form provided by the plugin has more features, functionality, etc.
724
+
725
+
726
  **More FAQs**
727
 
728
  Want to read some more FAQs? Check out the [USP FAQs at Perishable Press](https://perishablepress.com/faqs-user-submitted-posts/)
762
  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!
763
 
764
 
765
+ **20210719**
766
+
767
+ * Adds CSS classes to Login/Register form
768
+ * Adds `selected="true"` to default category option
769
+ * Adds filter hook `usp_title_tags_allow`
770
+ * Adds filter hook `usp_title_tags_allowed`
771
+ * Adds filter hook `usp_display_posts_args`
772
+ * Updates icon on plugin homepage
773
+ * Tests on WordPress 5.8
774
+
775
  **20210212**
776
 
777
  * Adds support to change reCaptcha language
user-submitted-posts.php CHANGED
@@ -9,9 +9,9 @@
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
- Tested up to: 5.7
13
- Stable tag: 20210212
14
- Version: 20210212
15
  Requires PHP: 5.6.20
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', '20210212');
44
  define('USP_PLUGIN', esc_html__('User Submitted Posts', 'usp'));
45
  define('USP_PATH', plugin_basename(__FILE__));
46
 
@@ -153,7 +153,14 @@ function usp_get_submitted_title() {
153
 
154
  $title = usp_get_default_title();
155
 
156
- if (isset($_POST['user-submitted-title'])) $title = sanitize_text_field($_POST['user-submitted-title']);
 
 
 
 
 
 
 
157
 
158
  if ($option === 'optn' && empty($title)) $title = usp_get_default_title();
159
 
9
  Donate link: https://monzillamedia.com/donate.html
10
  Contributors: specialk
11
  Requires at least: 4.1
12
+ Tested up to: 5.8
13
+ Stable tag: 20210719
14
+ Version: 20210719
15
  Requires PHP: 5.6.20
16
  Text Domain: usp
17
  Domain Path: /languages
40
 
41
 
42
  define('USP_WP_VERSION', '4.1');
43
+ define('USP_VERSION', '20210719');
44
  define('USP_PLUGIN', esc_html__('User Submitted Posts', 'usp'));
45
  define('USP_PATH', plugin_basename(__FILE__));
46
 
153
 
154
  $title = usp_get_default_title();
155
 
156
+ $allow_tags = apply_filters('usp_title_tags_allow', false);
157
+ $allowed_tags = apply_filters('usp_title_tags_allowed', '<em><i><strong><b>');
158
+
159
+ if (isset($_POST['user-submitted-title'])) {
160
+
161
+ $title = $allow_tags ? strip_tags($_POST['user-submitted-title'], $allowed_tags) : sanitize_text_field($_POST['user-submitted-title']);
162
+
163
+ }
164
 
165
  if ($option === 'optn' && empty($title)) $title = usp_get_default_title();
166
 
views/submission-form-alt.php CHANGED
@@ -98,7 +98,7 @@ else :
98
  <fieldset class="usp-category">
99
  <label for="user-submitted-category"><?php esc_html_e('Post Category', 'usp'); ?></label>
100
  <select id="user-submitted-category"<?php if (usp_check_required('usp_category')) echo $usp_required; echo $multiple_cats . $category_class; ?> name="user-submitted-category[]">
101
- <option value="" disabled><?php esc_html_e('Please select a category..', 'usp'); ?></option>
102
  <?php echo usp_get_cat_options(); ?>
103
  </select>
104
  </fieldset>
98
  <fieldset class="usp-category">
99
  <label for="user-submitted-category"><?php esc_html_e('Post Category', 'usp'); ?></label>
100
  <select id="user-submitted-category"<?php if (usp_check_required('usp_category')) echo $usp_required; echo $multiple_cats . $category_class; ?> name="user-submitted-category[]">
101
+ <option value="" selected="true" disabled><?php esc_html_e('Please select a category..', 'usp'); ?></option>
102
  <?php echo usp_get_cat_options(); ?>
103
  </select>
104
  </fieldset>
views/submission-form.php CHANGED
@@ -83,7 +83,7 @@ else :
83
  <fieldset class="usp-category">
84
  <label for="user-submitted-category"><?php esc_html_e('Post Category', 'usp'); ?></label>
85
  <select id="user-submitted-category"<?php if (usp_check_required('usp_category')) echo $usp_required; echo $multiple_cats . $category_class; ?> name="user-submitted-category[]">
86
- <option value="" disabled><?php esc_html_e('Please select a category..', 'usp'); ?></option>
87
  <?php echo usp_get_cat_options(); ?>
88
  </select>
89
  </fieldset>
83
  <fieldset class="usp-category">
84
  <label for="user-submitted-category"><?php esc_html_e('Post Category', 'usp'); ?></label>
85
  <select id="user-submitted-category"<?php if (usp_check_required('usp_category')) echo $usp_required; echo $multiple_cats . $category_class; ?> name="user-submitted-category[]">
86
+ <option value="" selected="true" disabled><?php esc_html_e('Please select a category..', 'usp'); ?></option>
87
  <?php echo usp_get_cat_options(); ?>
88
  </select>
89
  </fieldset>