PluginProbe
User Submitted Posts – Enable Users to Submit Posts from the Front End / 20230811
User Submitted Posts – Enable Users to Submit Posts from the Front End v20230811
20260916 20260810 20260608 20230806 20230809 20230811 20230901 20230902 20230914 20231102 20240319 20240516 20240703 20241026 20250327 20250329 20251121 20251210 20260110 20260113 20260207 20260217 20260407 20260422 trunk All 59 releases
user-submitted-posts / readme.txt

readme.txt in User Submitted Posts – Enable Users to Submit Posts from the Front End 20230811, at readme.txt

943 lines 42.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 === User Submitted Posts – Enable Users to Submit Posts from the Front End ===
2
3 Plugin Name: User Submitted Posts
4 Plugin URI: https://perishablepress.com/user-submitted-posts/
5 Description: Enables your visitors to submit posts and images from anywhere on your site.
6 Tags: frontend post, submit post, guest post, visitor post, content restriction, public post, share post, user post, user submitted post, upload
7 Author: Jeff Starr
8 Author URI: https://plugin-planet.com/
9 Donate link: https://monzillamedia.com/donate.html
10 Contributors: specialk
11 Requires at least: 4.6
12 Tested up to: 6.3
13 Stable tag: 20230811
14 Version: 20230811
15 Requires PHP: 5.6.20
16 Text Domain: usp
17 Domain Path: /languages
18 License: GPL v2 or later
19
20 Enable visitors and registered users to submit posts and images from the front-end of your site. Many features including anti-spam form security, content restriction, and more.
21
22
23
24 == Description ==
25
26 **🏆 The #1 Plugin for User-Generated Content!**
27
28 *Enable visitors to submit posts from the front end of your site.*
29
30 User Submitted Posts (USP) provides a front-end form that enables visitors to submit posts and upload images. Just add the following shortcode to any Post, Page, or Widget:
31
32 [user-submitted-posts]
33
34 That's all there is to it! Your site now can accept user generated content. Everything is super easy to customize via Plugin Settings page.
35
36 The post-submission form may include any/all of the following fields:
37
38 * Name
39 * Email
40 * URL
41 * Post Title
42 * Post Tags
43 * Post Category
44 * Post Content
45 * Custom Field 1
46 * Custom Field 2
47 * Custom Checkbox
48 * Challenge Question
49 * Google reCAPTCHA (v2 or v3)
50 * Post Images
51 * Agree to Terms
52
53 Each of these fields may be set as required, optional, or disabled. You can set the Post Status of submitted posts as "Pending", "Draft", "Publish Immediately", or publish after a specific number of approved posts.
54
55 USP enables users to upload any number of images when submitting a post. You can customize the min/max width, height, and number of submitted images.
56
57 USP also includes a Login/Register Form, and three shortcodes to control access and restrict content (more information below).
58
59
60 *🚀 User Submitted Posts is the first and best plugin for front-end content!*
61
62
63 ### ✨ Core Features ###
64
65 * Includes a fast & secure post-submission form
66 * Includes a simple login/register/password form
67 * Display forms anywhere via shortcode or template tag
68 * Includes shortcode to display a list of submitted posts
69 * Includes shortcodes to control access and restrict content
70 * Includes template tags to display submitted post content
71 * Includes configurable Custom Field for the post-submit form
72 * You choose which fields to display on the post-submit form
73 * Automatically display all submitted content on the front end
74 * Display post-submit & login forms via Text or HTML widgets
75 * Receive email notification alerts for submitted posts
76 * Image preview thumbnails for selected images
77 * NEW: front-end post deletion (via email link)
78
79 *Boost your site value with user-generated content!*
80
81
82 ### ✨ Form Features ###
83
84 * Google reCAPTCHA: v2 ("I am not a bot") or v3 (hidden recaptcha)
85 * Built-in client-side form validation with [Parsley](https://parsleyjs.org/)
86 * Stops spam via input validation, captcha, and hidden field
87 * Use either Challenge Question, Google reCAPTCHA, or both!
88 * Option to set submitted images as WP Featured Images
89 * Option to require users to be logged in to use the form
90 * Option to use WP's Rich Text Editor (RTE) for post content
91 * Redirect user to any URL or current page after submission
92 * Use the default HTML5 form or customize your own form
93 * Use the default form styles or add your own custom CSS
94 * Form fields may be set as optional or required
95 * Many action & filter hooks for advanced customization
96
97 *USP is simple to use and built with clean, secure code via the WP API!*
98
99
100 ### ✨ More Features ###
101
102 * Translated into 20+ languages
103 * Automatically detects logged-in users
104 * Regularly updated to stay current with WordPress
105 * Multiple emails supported in email alerts
106 * Option to set a default post category
107 * Option to disable loading of form JavaScript & CSS
108 * Option to specify URL for targeted resource loading
109 * Option to disable tracking of IP addresses
110 * Option to specify custom email alert subject
111 * Option to specify custom email alert message
112 * Option to submit posts as WP Posts or Pages
113 * Choose which categories users are allowed to select
114 * Assign submitted posts to any registered user
115 * Customizable success, error, and upload messages
116 * Works with or without Gutenberg Block Editor
117
118 *USP provides many options to help you create the perfect form!*
119
120
121 ### ✨ Content Restriction ###
122
123 USP provides three "Access Control" shortcodes to control access and restrict content. Here are some examples to give you an idea of how it works.
124
125 Display form and/or content only to users with a specific capability:
126
127 [usp_access cap="read" deny="Message for users without read capability"]
128 [user-submitted-posts] // Put the USP form or any other content here.
129 [/usp_access]
130
131 Display form and/or any content to logged-in users:
132
133 [usp_member deny="Message for users who are not logged in"]
134 [user-submitted-posts] // Put the USP form or any other content here.
135 [/usp_member]
136
137 Display form and/or any content to visitors only:
138
139 [usp_visitor deny="Message for users who are logged in"]
140 [user-submitted-posts] // Put the USP form or any other content here.
141 [/usp_visitor]
142
143 You can add and use Access Control shortcodes on any WP Post or Page. Tip: you can find this information (and more) in the plugin settings, under "Display the Form" > "Access Control".
144
145
146 ### ✨ Image Uploads ###
147
148 * Optionally enable visitors to upload any number of images
149 * Specify minimum & maximum allowed images for each post
150 * Specify minimum & maximum width & height for images
151 * Automatically set submitted images as Featured Images
152 * Automatically display submitted images on the front end
153 * Includes template tags to display submitted images
154 * Includes shortcodes to display submitted images
155
156
157 ### ✨ Post Management ###
158
159 * Custom Fields saved w/ each post: name, IP, URL, and image URLs
160 * Set posts to any status: Draft, Pending, Publish, or Moderate
161 * One-click filtering of submitted posts on the Admin Posts page
162
163 *Plus much more! Too many features to list them all!*
164
165
166 ### ✨ Translations ###
167
168 User Submitted Posts supports translation into any language. Current translations include the following languages:
169
170 Arabic - usp-ar
171 Bengali - usp-bn_BD
172 Chinese (Simplified) - usp-zh_CN
173 Chinese (Traditional) - usp-zh_TW
174 Czech - usp-cs_CZ
175 Dutch - usp-nl_NL
176 French (France) - usp-fr_FR
177 German - usp-de_DE
178 Greek - usp-el
179 Hebrew - usp-he_IL
180 Hindi - usp-hi_IN
181 Irish - usp-ga
182 Italian - usp-it_IT
183 Japanese - usp-ja
184 Korean - usp-ko_KR
185 Norwegian - usp-no
186 Persian - usp-fa_IR
187 Polish - usp-pl_PL
188 Portuguese (Brazil) - usp-pt_BR
189 Portuguese (Portugal) - usp-pt_PT
190 Punjabi - usp-pa_IN
191 Romanian - usp-ro_RO
192 Russian - usp-ru_RU
193 Serbian - usp-sr_RS
194 Slovenian - usp-sl_SI
195 Spanish (Spain) - usp-es_ES
196 Swedish - usp-sv_SE
197 Turkish - usp-tr_TR
198 Urdu - usp-ur
199
200 __Note:__ most of the default translations are made via Google Translate. So they are automated and may be a little rough. Feel free to make your own translation as desired. Need a translation into your language? [Let me know!](https://plugin-planet.com/support/#contact)
201
202
203 ### ✨ Pro Version ###
204
205 __USP Pro__ now available at [Plugin Planet](https://plugin-planet.com/usp-pro/)!
206
207 Pro version includes many, many more features and settings, with unlimited custom forms, infinite custom fields, multimedia file uploads, and much more. [Check it out »](https://plugin-planet.com/usp-pro/)
208
209
210 ### ✨ Privacy ###
211
212 __User Data:__ This plugin enables users to submit post content. It collects data _only_ from users who voluntarily submit content via the USP form. The only involuntary data that is collected is the IP address of the person submitting the form. The plugin provides an option to disable IP collection completely.
213
214 __Cookies:__ This plugin uses simple cookies to enable dynamic form functionality. No cookies are used for any other purpose.
215
216 __Services:__ This plugin provides an option to enable Google reCaptcha, which is provided by Google as a third-party service. For details on privacy and more, please refer to official documentation for [Google reCaptcha](https://developers.google.com/recaptcha/). No other outside services or locations are accessed/used by this plugin.
217
218
219 ### ✨ Developer ###
220
221 User Submitted Posts is developed and maintained by [Jeff Starr](https://twitter.com/perishable), 15-year [WordPress developer](https://plugin-planet.com/) and [book author](https://books.perishablepress.com/).
222
223
224
225 == Installation ==
226
227 ### How to install the plugin ###
228
229 1. Upload the plugin to your blog and activate
230 2. Configure your options via the plugin settings
231 3. Display the form via shortcode or template tag
232
233 [More info on installing WP plugins](https://wordpress.org/support/article/managing-plugins/#installing-plugins)
234
235
236 ### How to use the plugin ###
237
238 To display the form on any WP Post, Page, or widget, add the shortcode:
239
240 [user-submitted-posts]
241
242 Or, to display the form anywhere in your theme, add the template tag:
243
244 <?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?>
245
246
247 ### Customizing the form ###
248
249 There are three main ways of customizing the form:
250
251 * Plugin settings, you can show/hide fields, configure options, etc.
252 * Custom form template (see "Custom Submission Form" for more info)
253 * By using USP action/filter hooks (advanced)
254
255 USP Hooks:
256
257 `Filters:
258 usp_post_status
259 usp_post_author
260 usp_form_shortcode
261 usp_mail_subject
262 usp_mail_message
263 usp_new_post
264 usp_input_validate
265 usp_require_login
266 usp_default_title
267
268 Actions:
269 usp_submit_success
270 usp_submit_error
271 usp_insert_before
272 usp_insert_after
273 usp_files_before
274 usp_files_after`
275
276 Check out the [complete list of action hooks for User Submitted Posts](https://perishablepress.com/action-filter-hooks-user-submitted-posts/)
277
278 More info about [WordPress Actions and Filters](https://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters)
279
280
281 ### Custom Submission Form ###
282
283 Out of the box, User Submitted Posts provides a highly configurable submission form. Simply visit the plugin settings to control which fields are displayed, set the Challenge Question, configure submitted images, and much more.
284
285 There are situations, however, where advanced form configuration may be required. In order to allow for this, USP makes it possible to create a custom submission form. Here are the steps:
286
287 First, copy these two plugin files:
288
289 /user-submitted-posts/resources/usp.css
290 /user-submitted-posts/views/submission-form.php
291
292 Then, paste those two files into a directory named `/usp/` in your theme:
293
294 /wp-content/themes/your-theme/usp/usp.css
295 /wp-content/themes/your-theme/usp/submission-form.php
296
297 Lastly, visit the plugin settings and change "Form style" to "Custom Form + CSS". You now may customize the two files as desired; they will not be overwritten when the plugin is updated. For help with making basic changes to the custom form, check out the [USP FAQs](https://perishablepress.com/faqs-user-submitted-posts/#customize-form) at Perishable Press.
298
299 Alternately, you can set the option "Form style" to "HTML5 Form + Disable CSS" to use the default USP form along with your own CSS. FYI: here is a list of [USP CSS selectors](https://m0n.co/e).
300
301 Or, to go further with unlimited custom forms, [check out USP Pro](https://plugin-planet.com/usp-pro/) :)
302
303
304 ### Displaying submitted posts ###
305
306 User-submitted posts are handled by WordPress as regular WP Posts. So they are displayed along with your other posts according to your theme design. Additionally, each submitted post includes a set of Custom Fields that include the following information:
307
308 * `is_submission` - indicates that the post is a user-submitted post
309 * `user_submit_image` - the URL of the submitted image (one custom field per image)
310 * `user_submit_ip` - the IP address of the submitted-post author
311 * `user_submit_name` - the name of the submitted-post author
312 * `user_submit_url` - the submitted URL
313 * `usp_custom_field` - configurable Custom Field
314
315 There are numerous ways to display these Custom Fields. The easiest way is to visit the plugin settings and configure the options available under "Auto-Display Content". There you can enable auto-display of submitted email address, URL, and images. Note that submitted images also are uploaded to the WP Media Library.
316
317 For more flexibility, you can use a variety of WP Template Tags (e.g., [get_post_meta()](https://codex.wordpress.org/Function_Reference/get_post_meta)) to display Custom Fields. Here are some tutorials for more information:
318
319 * [WordPress Custom Fields, Part I: The Basics](https://perishablepress.com/wordpress-custom-fields-tutorial/)
320 * [WordPress Custom Fields, Part II: Tips and Tricks](https://perishablepress.com/wordpress-custom-fields-tips-tricks/)
321
322 And here are some tutorials that may help with custom display of submitted images:
323
324 * [Display all images attached to post](https://wp-mix.com/display-images-attached-post/)
325 * [Display images with links](https://wp-mix.com/display-images-with-user-submitted-posts/)
326
327 Also, here is a [Helper Plugin to display Custom Fields](https://plugin-planet.com/usp-pro-custom-field-helper-plugin/). It originally is designed for use with USP Pro, but also works great with the free version of USP.
328
329
330 ### Auto Display Images ###
331
332 To automatically display submitted images on the front end, visit the plugin settings, "Images Auto-Display" and select whether to display the images before or after post content. Save changes.
333
334
335 ### Featured Images ###
336
337 To set submitted images as Featured Images (aka Post Thumbnails) for submitted posts, visit the plugin settings, "Image Uploads" and check the box to enable "Featured Image". Save changes.
338
339
340 ### Shortcodes ###
341
342 User Submitted Posts provides a set of useful shortcodes. Check out the "Display the Form" panel in the plugin settings for examples and more information.
343
344 [user-submitted-posts] : displays the form on any Post or Page
345 [usp-login-form] : displays a login/register/password form
346 [usp_display_posts] : displays list of all submitted posts
347 [usp-reset-button url="https://example.com/"] : displays a button to reset the form
348 [usp_access cap="read" deny=""][/usp_access] : limits access to specific user capability
349 [usp_visitor deny=""][/usp_visitor] : limits access to visitors (not logged in) only
350 [usp_member deny=""][/usp_member] : limits access to logged-in users
351
352
353 Here is more info about these shortcodes:
354
355 __`[user-submitted-posts]`__
356
357 Displays the post-submit form. This shortcode does not accept any attributes.
358
359
360 __`[usp-login-form]`__
361
362 Displays the login/register/password form. This shortcode does not accept any attributes.
363
364 To add Google reCaptcha to the form, you can use any good reCaptcha plugin. Here are a few examples:
365
366 * [reCAPTCHA Lite](https://wordpress.org/plugins/recaptcha-lite/)
367 * [Smart Captcha (reCAPTCHA)](https://wordpress.org/plugins/smart-recaptcha/)
368 * [reCaptcha by BestWebSoft](https://wordpress.org/plugins/google-captcha/)
369
370 These are not endorsements for these plugins. They have been tested and work with the USP login/register/password form.
371
372
373 __`[usp_display_posts]`__
374
375 Displays a list of all submitted posts. This shortcode accepts two optional attributes, "userid" and "numposts". Examples:
376
377 [usp_display_posts] : default displays all submitted posts by all authors
378 [usp_display_posts userid="current"] : displays all submitted posts by current logged-in user
379 [usp_display_posts userid="1"] : displays all submitted posts by registered user with ID = 1
380 [usp_display_posts userid="Pat Smith"] : displays all submitted posts by author name "Pat Smith"
381 [usp_display_posts userid="all"] : displays all submitted posts by all users/authors
382 [usp_display_posts userid="all" numposts="5"] : limit to 5 posts from all users
383 [usp_display_posts post_type="page"] : display only submitted pages
384
385 So the shortcode attributes can be used to customize the post list as desired. Note that the Pro version of USP provides many more options for the [display-posts shortcode](https://plugin-planet.com/usp-pro-display-list-submitted-posts/).
386
387
388 __`[usp_gallery]`__
389
390 __Note:__ This shortcode works only when added to a submitted post. It does nothing when added anywhere else.
391
392 Displays a gallery of all submitted images for the current post. Customize via the following attributes:
393
394 $size = image size as thumbnail, medium, large or full -> default = thumbnail
395 $before = text/markup displayed before the image URL -> default = {a href='%%url%%'}{img src='
396 $after = text/markup displayed after the image URL -> default = ' /}{/a}
397 $number = the number of images to display for each post -> default = false (display all)
398 $postId = an optional post ID to use -> default = false (uses global/current post)
399
400 Notes:
401 Use curly brackets to output angle brackets
402 Use single quotes in before/after attributes
403 Can use %%url%% to get the URL of the full-size image
404 Check out the source code inline notes for more info
405
406
407 __`[usp-reset-button]`__
408
409 Displays a button to reset the form. Accepts the following attributes:
410
411 class = classes for the parent element (optional, default: none)
412 value = link text (optional, default: "Reset form")
413 url = the URL where your form is displayed (required, default: none)
414 custom = any attributes or custom code for the link element (optional, default: none)
415
416 Note that the `url` attribute accepts `%%current%%` for the current URL (useful when the form is displayed in the sidebar).
417
418
419 __`[usp_access]`__
420
421 Limits access to specific user capability. Example:
422
423 [usp_access cap="read"]
424 Content for users that have "read" access
425 [/usp_access]
426
427 The `cap` attribute specifies the required capability or capabilities (comma-separated). This shortcode also accepts an optional `deny` attribute. The `deny` attribute displays a message to users who are denied access. Tip: to include markup in the deny message, you can use `{tag}` to display `<tag>`. Check out the "Display the Form" panel in the plugin settings for examples and more info.
428
429
430 __`[usp_visitor]`__
431
432 Limits access to visitors (not logged in) only. Example:
433
434 [usp_visitor]
435 Content for for users who are not logged in
436 [/usp_visitor]
437
438 This shortcode accepts an optional `deny` attribute. The `deny` attribute displays a message to users who are denied access. Tip: to include markup in the deny message, you can use `{tag}` to display `<tag>`. Check out the "Display the Form" panel in the plugin settings for examples and more info.
439
440
441 __`[usp_member]`__
442
443 Limits access to logged-in users. Example:
444
445 [usp_member]
446 Content for for users who are logged in
447 [/usp_member]
448
449 This shortcode accepts an optional `deny` attribute. The `deny` attribute displays a message to users who are denied access. Tip: to include markup in the deny message, you can use `{tag}` to display `<tag>`. Check out the "Display the Form" panel in the plugin settings for examples and more info.
450
451
452 ### Template tags ###
453
454 User Submitted Posts provides a set of useful template tags:
455
456 /*
457 Display the Post-Submission Form
458 Usage: <?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?>
459 */
460
461 user_submitted_posts()
462
463
464 /*
465 Display the Login/Register/Password Form
466 Usage: <?php if (function_exists('usp_login_form')) usp_login_form(); ?>
467 */
468
469 usp_login_form()
470
471
472 /*
473 Display a configurable list of submitted posts
474 Usage: <?php if (function_exists('usp_display_posts')) echo usp_display_posts(array('userid' => 'all', 'numposts' => -1)); ?>
475 */
476
477 usp_display_posts()
478
479
480 /*
481 Check if post is a submitted post
482 Returns true or false
483 Usage: <?php if (usp_is_public_submission()) return true; ?>
484 */
485
486 usp_is_public_submission()
487
488
489 /*
490 Get all image URLs
491 Returns an array of image URLs that are attached to the current submitted post
492 Usage: <?php $images = usp_get_post_images(); foreach ($images as $image) echo $image; ?>
493 */
494
495 usp_get_post_images()
496
497
498 /*
499 Display all images
500 Outputs a set of <img> tags for images attached to the current submitted post
501 Usage: <?php usp_post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?>
502 Parameters:
503 $size = image size: thumbnail, medium, large or full -> default = full
504 $beforeUrl = text/markup displayed before each image URL -> default = <img src="
505 $afterUrl = text/markup displayed after each image URL -> default = " />
506 $numberImages = number of images to display for each post -> default = false (display all)
507 $postId = an optional post ID to use -> default = uses global post
508 */
509
510 usp_post_attachments()
511
512
513 /*
514 Display submitted author name and URL
515 This tag displays one of the following:
516 - The author's submitted name as a link (if both 'User Name' and 'User URL' fields are included in the form)
517 - The author's submitted name as plain text (if 'User Name' is included in the form, but 'User URL' is not included)
518 - The author's registered username as a link to the author's post archive (if 'User Name' is not included in the form)
519
520 Usage: <?php usp_author_link(); ?>
521 */
522
523 usp_author_link()
524
525
526 /*
527 Get an array of image URLs, wrapped in optional HTML
528 Syntax: <?php if (function_exists('usp_get_images')) $images = usp_get_images($size, $before, $after, $number, $postId); ?>
529 Usage: <?php if (function_exists('usp_get_images')) $images = usp_get_images(); foreach ($images as $image) echo $image; ?>
530 Parameters:
531 $size = image size as thumbnail, medium, large or full -> default = thumbnail
532 $before = text/markup displayed before the image URL -> default = {img src="
533 $after = text/markup displayed after the image URL -> default = " /}
534 $number = the number of images to display for each post -> default = false (display all)
535 $postId = an optional post ID to use -> default = false (uses global/current post)
536
537 Notes:
538 For $before/$after parameters, use curly brackets instead of angle brackets, for example:
539 usp_get_images('thumbnail', '{img src="', '" /}');
540 // results in each image URL wrapped like: <img src="[image URL]" />
541
542 For $before/$after parameters, use %%url%% to get the URL of the full-size image, for example:
543 usp_get_images('thumbnail', '{a href="%%url%%"}{img src="', '" /}{/a}');
544 // outputs for each image: <a href="[full-size image URL]"><img src="[image URL]" /></a>
545 */
546
547 usp_get_images()
548
549
550 These template tags should work out of the box when included in your theme template file(s). Keep in mind that for some of the tags to work, there must be some existing submitted posts and/or images available.
551
552 The source code for these tags is located in `/library/template-tags.php` and `shortcode-login.php`.
553
554
555 ### Upgrades ###
556
557 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.
558
559 __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](https://wordpress.org/plugins/user-submitted-posts/#installation).
560
561 __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.
562
563
564 ### Restore Default Options ###
565
566 To restore default plugin options, either uninstall/reinstall the plugin, or visit the plugin settings &gt; Restore Default Options.
567
568
569 ### Uninstalling ###
570
571 User Submitted Posts cleans up after itself. All plugin settings will be removed from your database when the plugin is uninstalled via the Plugins screen. 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_.
572
573
574 ### Pro Version ###
575
576 Pro version of USP now available! USP Pro includes many more awesome features and settings, with unlimited custom forms, infinite custom fields, multimedia file uploads, and much, much more.
577
578 * [Check out USP Pro for virtually limitless form-building action &raquo;](https://plugin-planet.com/usp-pro/)
579 * [Read what users are saying about USP Pro &raquo;](https://plugin-planet.com/testimonials/)
580
581
582 ### Like the plugin? ###
583
584 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!
585
586
587
588 == Upgrade Notice ==
589
590 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.
591
592 __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](https://wordpress.org/plugins/user-submitted-posts/#installation).
593
594 __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.
595
596
597
598 == Screenshots ==
599
600 1. USP Settings Screen (panels toggled closed)
601 2. USP Plugin Settings, showing default options (panels toggle open/closed)
602 3. USP Form (with all fields enabled)
603 4. USP Form (with just a few fields enabled)
604 5. Example showing how to display the form on a Page (using a shortcode)
605
606 More screenshots and infos available at the [USP Homepage](https://perishablepress.com/user-submitted-posts/)
607
608
609
610 == Frequently Asked Questions ==
611
612 **Can you add this feature or that feature?**
613
614 Please check the [Pro version of USP](https://plugin-planet.com/usp-pro/), which includes many of the most commonly requested features from users. The free version also may include new features in future updates.
615
616
617 **Images are not uploaded or displaying**
618
619 If everything is configured properly, USP will display submitted images on the front-end. If that is not happening, here are some things to check:
620
621 * Make sure that the setting "Images Auto-Display" is enabled
622 * And/or make sure that the setting "Featured Image" is enabled
623 * And/or make sure that your theme is set up to display submitted images
624
625 Assuming that everything is set up to display submitted images, here are some further things to check:
626
627 * Is there any error message when trying to submit an image?
628 * Check that the submitted images are uploaded to the Media Library
629 * Check that the URL of the submitted image is attached to the submitted post as a Custom Field (on Edit Post screen)
630 * Check the permission settings on the upload folder(s) by ensuring that you can successfully upload image files directly via the Media Uploader
631 * Double-check that all the "Image Uploads" settings make sense, and that the images being uploaded meet the specified requirements
632
633 Note: when changing permissions on files and folders, it is important to use the least-restrictive settings possible. If you have to use more permissive settings, it is important to secure the directory against malicious activity. For more information check out: [Secure Media Uploads](https://digwp.com/2012/09/secure-media-uploads/)
634
635
636 **How to set submitted image as the featured image?**
637
638 Here are the steps:
639
640 1. Visit USP settings &gt; Options panel &gt; Image Uploads &gt; Featured Image
641 2. Check the box and click "Save Settings" to save your changes
642
643 Note that this setting merely assigns the submitted image as the Featured Image; it's up to your theme's single.php file to include `the_post_thumbnail()` to display the Featured Images. If your theme is not so equipped, [check out this tutorial at WP-Mix](https://wp-mix.com/set-attachment-featured-image/).
644
645
646 **How to require login?**
647
648 Visit the plugin settings and enable the option to "Require User Login". That will display the submission form only to logged-in users. To go further and require login for other types of content, there are many techniques available to you. For more information check out my WP-Mix post, [WordPress Require User Login](https://wp-mix.com/wordpress-require-user-login/), which provides a good summary of the possibilities. Also note: [USP Pro includes built-in shortcodes](https://plugin-planet.com/usp-pro-display-form-logged-in-users/) to display forms and other content to registered/logged-in users and/or guests/logged-out users.
649
650
651 **How do I change the appearance of the submission form?**
652
653 The easiest way to customize the form is via the plugin settings. There you can choose one of the following form configurations:
654
655 * HTML5 Form + Default CSS (Recommended)
656 * HTML5 Form + Disable CSS (Provide your own styles)
657 * Custom Form + Custom CSS (Provide your own form template & styles)
658
659 Additionally, you can configure the settings to show/hide specific fields, control the number and size of submitted images, customize the Challenge Question, and much more.
660
661 To go beyond what's possible with the plugin settings, USP enables creation of a custom submission form. To learn how, check out the "Custom Submission Form" section under [Installation](https://wordpress.org/plugins/user-submitted-posts/installation/). And for advanced customization, developers can use [USP action and filter hooks](https://perishablepress.com/action-filter-hooks-user-submitted-posts/).
662
663 Or, to go further with unlimited custom forms, [check out USP Pro](https://plugin-planet.com/usp-pro/) :)
664
665
666 **What is the "alternate" form?**
667
668 Inside of the `/views/` directory, you will find an alternate form template named `submission-form-alt.php`. This template is identical to that used for the default form, with the exception that it returns the post-submit form in addition to the success message. You can use the alternate form template by following the steps provided via the "Custom Submission Form" section of the plugin documentation/readme.
669
670
671 **What about security and spam?**
672
673 User Submitted Posts uses the WordPress API to keep everything secure, fast, and flexible. The plugin also features Google reCAPTCHA, Challenge Question, and hidden anti-spam field to stop automated spam and bad bots.
674
675
676 **Can I include video?**
677
678 The free version of USP supports uploads of images only, but some hosted videos may be included in the submitted content (textarea) by simply including the video URL on its own line. See [this page](https://codex.wordpress.org/Embeds) for more info. Note that [USP Pro](https://plugin-planet.com/usp-pro/) enables users to [upload video and much more](https://plugin-planet.com/usp-pro-allowed-file-types/#file-formats).
679
680
681 **How do I reset the plugin settings?**
682
683 To reset plugin settings to factory defaults:
684
685 1. Visit "Restore Default Options" in the plugin settings
686 2. Check the box and save your changes
687 3. Deactivate the plugin and then reactivate it
688 4. Plugin settings now are restored to defaults
689
690 Restoring default settings does not delete any submitted posts. Even if you completely remove the plugin, the submitted posts will not be deleted. You have to remove them manually, if desired.
691
692
693 **How do I enable the "Add Media" button for all users?**
694
695 Question: How do I enable the "Add Media" button for all users (even if not registered)?
696
697 Answer: Users must have sufficient capabilities to access the Media Library and the "Add Media" button. This is a security measure aimed at preventing foul play. The Pro version of USP provides an option to [enable Add Media uploads for all user levels](https://plugin-planet.com/usp-pro-enable-non-admin-users-upload-media/).
698
699
700 **Can you explain the setting "Registered Username"?**
701
702 When "Registered Username" is enabled:
703
704 * If the user is logged in, their registered username is used as the Post Author
705 * If the user is logged out, the setting "Assigned Author" is used as the Post Author
706
707 When "Registered Username" is disabled:
708
709 * The setting "Assigned Author" always is used as the Post Author for all users (whether logged in or not)
710
711
712 **How can I translate this plugin?**
713
714 Currently the easiest and most flexible method is to [use GlotPress to translate USP](https://translate.wordpress.org/projects/wp-plugins/user-submitted-posts). That is the recommended translation route going forward, but for the time being you may also translate using a plugin such as [Loco Translate](https://wordpress.org/plugins/loco-translate/). FYI, USP's translation files are located in the `/languages/` directory.
715
716
717 **Why am I not receiving the Email Alerts?**
718
719 Normally the plugin sends an Email Alert each time a post is submitted. If that is not happening in your case, you will need to troubleshoot your setup. Here is a guide on [Troubleshooting Email](https://perishablepress.com/email-troubleshooting-guide/) that should help.
720
721
722 **How to disable image preview feature?**
723
724 To disable the image-preview thumbnail feature, add the following line to the plugin setting, "Custom Content":
725
726 `<script>var usp_disable_previews = true;</script>`
727
728 Save changes and done.
729
730
731 **How to disable fancy category/tag select script?**
732
733 USP uses the Chosen.js library to enhance the behavior and appearance of the Category and Tag fields. The enhanced fields will be displayed when either/both of the following are true:
734
735 * The option "Multiple Categories" is enabled (for Category field)
736 * The option "Use Existing Tags" is enabled (for Tag field)
737
738 If you want to disable the fancy Chosen script for these fields, you can do so by adding the following code snippet to the plugin setting, "Custom Content":
739
740 `<script>var usp_disable_chosen = true;</script>`
741
742 Save changes and done.
743
744
745 **How to change the language for Google reCaptcha?**
746
747 By default, the Google reCaptcha field is displayed in English. To change that to some other language, first locate the two-digit abbreviation for your language [here](https://developers.google.com/recaptcha/docs/language). Then add the following code to your theme (or child theme) functions.php, or add via [custom plugin](https://digwp.com/2022/02/custom-code-wordpress/):
748
749 `function usp_recaptcha_querystring($query) { return 'en'; }
750 add_filter('usp_recaptcha_querystring', 'usp_recaptcha_querystring');`
751
752 Notice where it says `en`, that is the two-character language code you want to replace with your own. Then save changes and done.
753
754
755 **Where can I check out a demo of the USP form?**
756
757 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.
758
759
760 **How to allow blank targets in post content?**
761
762 By default, USP removes any `target="_blank"` attributes in submitted post content. This is a recommended security feature. It is possible however to allow blank targets:
763
764 `function usp_content_patterns($array) { return array(); }
765 add_filter('usp_content_patterns', 'usp_content_patterns');`
766
767 That code can be added via theme (or child theme) functions.php, or add via [custom plugin](https://digwp.com/2022/02/custom-code-wordpress/).
768
769
770 **How to disable all HTML tags in submitted posts?**
771
772 Add the code snippet provided [here](https://perishablepress.com/faqs-user-submitted-posts/#allowed-tags).
773
774
775 **How does the remote delete post link work?**
776
777 When `%%delete_link%%` is included in your email alert template, a link will be included that the user can click to delete their submitted post. This works when the user who submitted the post is logged in to WordPress. It does not work for users who are not logged in, or are not the post author. For more details and tips, check out the [USP FAQs](https://perishablepress.com/faqs-user-submitted-posts/#delete-post-message) at Perishable Press.
778
779
780 **More FAQs**
781
782 Want to read some more FAQs? Check out the [USP FAQs at Perishable Press](https://perishablepress.com/faqs-user-submitted-posts/)
783
784
785 **Questions? Feedback?**
786
787 Send any questions or feedback via my [contact form](https://plugin-planet.com/support/#contact). Thanks! :)
788
789
790
791 == ✨ Support Development ==
792
793 I develop and maintain this free plugin with love for the WordPress community. To show support, you can [make a donation](https://monzillamedia.com/donate.html) or purchase one of my books:
794
795 * [The Tao of WordPress](https://wp-tao.com/)
796 * [Digging into WordPress](https://digwp.com/)
797 * [.htaccess made easy](https://htaccessbook.com/)
798 * [WordPress Themes In Depth](https://wp-tao.com/wordpress-themes-book/)
799 * [Wizard's SQL Recipes for WordPress](https://books.perishablepress.com/downloads/wizards-collection-sql-recipes-wordpress/)
800
801 And/or purchase one of my premium WordPress plugins:
802
803 * [BBQ Pro](https://plugin-planet.com/bbq-pro/) - Super fast WordPress firewall
804 * [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) - Automatically block bad bots
805 * [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) - Monitor traffic and ban the bad guys
806 * [GA Google Analytics Pro](https://plugin-planet.com/ga-google-analytics-pro/) - Connect WordPress to Google Analytics
807 * [Simple Ajax Chat Pro](https://plugin-planet.com/simple-ajax-chat-pro/) - Unlimited chat rooms
808 * [USP Pro](https://plugin-planet.com/usp-pro/) - Unlimited front-end forms
809
810 Links, tweets and likes also appreciated. Thanks! :)
811
812
813
814 == Changelog ==
815
816 *Thank you to everyone who shares feedback for User Submitted Posts!*
817
818 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!
819
820
821 **20230811**
822
823 * Removes `$custom` variable from `usp_reset_button_shortcode()`
824 * Tests on WordPress 6.3
825
826 **20230809**
827
828 * Improves security for `[usp-reset-button]` shortcode (Thanks [ancorn_](https://twitter.com/ancorn_))
829 * Fixes bug with `usp_replaceAuthor()`
830 * Tests on WordPress 6.3
831
832 **20230806**
833
834 * Fixes bug with undefined `$post` variable
835 * Tests on WordPress 6.3 (beta)
836
837 **20230722**
838
839 * Improves support panel logic
840 * Improves localization function
841 * Fixes bug with `SameSite` cookies
842 * Refactors some file path variables
843 * Moves activation hooks to main plugin file
844 * Change URL/slug for plugin settings page
845 * Fixes incorrect filter hook `usp_date_time`
846 * Adds custom notice on settings page
847 * Removes top "show support" panel
848 * Updates default translation template
849 * Updates all translation files
850 * Improves plugin documentation
851 * Tests on WordPress 6.3 (beta)
852
853 **20230311**
854
855 * Improves logic for dates and times
856 * Tests on WordPress 6.2 (beta)
857
858 **20230308**
859
860 * Tweaks settings UI
861 * Improves responsive styles
862 * Improves reCaptcha functionality
863 * Adds filter hook `usp_check_if_allowed`
864 * Adds filter hook `usp_force_delete_post`
865 * Fixes numerous warnings for PHP 8.1 and 8.2
866 * Improves logic of `usp_createPublicSubmission()`
867 * Adds `%%delete_link%%` shortcut for email alerts
868 * Adds filter hooks `usp_filter_cats` and `usp_filter_tags`
869 * Improves logic when calling `get_current_screen()`
870 * Moves WP Resources panel to its own function
871 * Removes SES Pro from WP Resources panel
872 * Generates new translation template
873 * Updates all translation files
874 * Tests on WordPress 6.1 + 6.2 (beta)
875 * Tests on PHP 8.1 and 8.2
876
877 **20221004**
878
879 * Improves calls to `get_current_screen()`
880 * Removes `usp_print_scripts()` (for WP &lt; 4.5)
881 * Adds a second (optional) custom field to the form :)
882 * Updates `usp_inline_script()` for minimum required version
883 * Fixes bug with overwriting global `$allowedposttags` variable
884 * Changes menu name from "User Submitted Posts" to "Submitted Posts"
885 * Adds filter hooks `usp_append_tags` and `usp_append_cats` ([Thanks](https://wordpress.org/support/topic/request-support-for-appending-taxonomies/) [@johnh10](https://wordpress.org/support/users/johnh10/))
886 * Adds `accept` to file inputs to filter non-image files ([Thanks](https://wordpress.org/support/topic/restrict-browse-files-to-allowed-file-types/) [@greentreefrog](https://wordpress.org/support/users/greentreefrog/))
887 * Support panel now contained in its own function
888 * Adds custom footer text to plugin settings
889 * Improves plugin settings screen UI
890 * Improves plugin documentation
891 * Updates "Show Support" panel
892 * Updates all translation files
893 * Updates translation template
894 * Tests on WordPress 6.1
895
896 **20220517**
897
898 * Tests on WordPress 6.0
899
900 **20220123**
901
902 * Updates support panel
903 * Improves loading of translations
904 * Adds option to select a default Featured Image
905 * Adds `post_type` attribute to `[usp_display_posts]`
906 * Updates some links to external resources
907 * Changes minimum required WP version to 4.6
908 * Tests on WordPress 5.9
909
910 **20210719**
911
912 * Adds CSS classes to Login/Register form
913 * Adds `selected="true"` to default category option
914 * Adds filter hook `usp_title_tags_allow`
915 * Adds filter hook `usp_title_tags_allowed`
916 * Adds filter hook `usp_display_posts_args`
917 * Updates icon on plugin homepage
918 * Tests on WordPress 5.8
919
920 **20210212**
921
922 * Adds support to change reCaptcha language
923 * Adds filter hook `usp_recaptcha_querystring`
924 * Updates deprecated functions for newer versions of jQuery
925 * Fixes bug where "Please select" could be chosen as category/tag
926 * Improves description/label for "Add another image" setting
927 * Improves documentation on settings page and readme.txt
928 * Tests on WordPress 5.7
929
930 **20201120**
931
932 * Adds support for disabling comments
933 * Fixes bug with `usp_display_posts()`
934 * Fixes some PHP Notices "array offset"
935 * Improves appearance of the settings page
936 * Improves/updates readme.txt/documentation
937 * Tests on PHP 7.4 and 8.0
938 * Tests on WordPress 5.6
939
940 **Previous Changelog Info**
941
942 Previous changelog information is available in the file, [changelog.txt](https://plugins.svn.wordpress.org/user-submitted-posts/trunk/changelog.txt), located in the plugin's root directory.
943