PluginProbe
User Submitted Posts – Enable Users to Submit Posts from the Front End / 20260916
User Submitted Posts – Enable Users to Submit Posts from the Front End v20260916
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
← All changes | library/plugin-settings.php +50 -13 2025032720260916 View file →
@@ -34,11 +34,11 @@
34 34
35 35 if ($file === USP_FILE) {
36 36
37 37 $pro_href = 'https://plugin-planet.com/usp-pro/';
38 - $pro_title = esc_attr__('Get USP Pro for unlimited forms!', 'usp');
39 - $pro_text = esc_html__('Go Pro', 'usp');
40 - $pro_style = 'font-weight:bold;';
38 + $pro_title = esc_attr__('Get USP Pro for unlimited forms', 'usp');
39 + $pro_text = esc_html__('Go Pro', 'usp');
40 + $pro_style = 'padding:2px 4px;font-weight:bold;border:1px solid #00CCCC;border-radius:2px;background-color:#fff;';
41 41
42 42 $pro = '<a target="_blank" rel="noopener noreferrer" href="'. $pro_href .'" title="'. $pro_title .'" style="'. $pro_style .'">'. $pro_text .'</a>';
43 43
44 44 array_unshift($links, $pro);
@@ -55,13 +55,13 @@
55 55 function add_usp_links($links, $file) {
56 56
57 57 if ($file === USP_FILE) {
58 58
59 - $home_href = 'https://perishablepress.com/user-submitted-posts/';
60 - $home_title = esc_attr__('Plugin Homepage', 'usp');
61 - $home_text = esc_html__('Homepage', 'usp');
59 + $home_href = 'https://plugin-planet.com/usp-pro/';
60 + $home_title = esc_attr__('Get USP Pro for unlimited forms', 'usp');
61 + $home_text = esc_html__('Go&nbsp;Pro', 'usp');
62 62
63 - $links[] = '<a target="_blank" rel="noopener noreferrer" href="'. $home_href .'" title="'. $home_title .'">'. $home_text .'</a>';
63 + $links[] = '<strong><a target="_blank" rel="noopener noreferrer" href="'. $home_href .'" title="'. $home_title .'">'. $home_text .'</a></strong>';
64 64
65 65 $rate_href = 'https://wordpress.org/support/plugin/user-submitted-posts/reviews/?rate=5#new-post';
66 66 $rate_title = esc_attr__('Give USP a 5-star rating at WordPress.org', 'usp');
67 67 $rate_text = esc_html__('Rate this plugin&nbsp;&raquo;', 'usp');
@@ -482,8 +482,38 @@
482 482 }
483 483
484 484
485 485
486 +function usp_form_field_options_turnstile() {
487 +
488 + global $usp_options;
489 +
490 + $name = 'usp_turnstile';
491 + $label = esc_html__('Cloudflare Turnstile', 'usp');
492 +
493 + $option = isset($usp_options[$name]) ? $usp_options[$name] : '';
494 +
495 + $selected_show = ($option === 'show') ? 'selected="selected"' : '';
496 + $selected_hide = ($option === 'hide') ? 'selected="selected"' : '';
497 +
498 + $output = '<tr>';
499 + $output .= '<th scope="row"><label class="description" for="usp_options['. esc_attr($name) .']">'. esc_html($label) .'</label></th>';
500 + $output .= '<td>';
501 + $output .= '<select name="usp_options['. esc_attr($name) .']" id="usp_options['. esc_attr($name) .']">';
502 +
503 + $output .= '<option '. $selected_show .' value="show">'. esc_html__('Enable and require', 'usp') .'</option>';
504 + $output .= '<option '. $selected_hide .' value="hide">'. esc_html__('Disable this field', 'usp') .'</option>';
505 +
506 + $output .= '</select>';
507 + $output .= '</td>';
508 + $output .= '</tr>';
509 +
510 + return $output;
511 +
512 +}
513 +
514 +
515 +
486 516 function usp_form_field_options_images() {
487 517
488 518 global $usp_options;
489 519
@@ -938,9 +968,12 @@
938 968 'custom_checkbox' => false,
939 969 'custom_checkbox_name' => 'usp_custom_checkbox',
940 970 'custom_checkbox_text' => 'I agree the to the terms.',
941 971 'custom_checkbox_err' => 'Custom checkbox required',
942 - 'custom_checkbox_req' => true
972 + 'custom_checkbox_req' => true,
973 + 'turnstile_site_key' => '',
974 + 'turnstile_secret_key' => '',
975 + 'usp_turnstile' => 'hide'
943 976 );
944 977
945 978 update_option('usp_options', $arr);
946 979
@@ -952,8 +985,9 @@
952 985
953 986 function usp_delete_plugin_options() {
954 987
955 988 delete_option('usp_options');
989 + delete_option('user-submitted-posts-dismiss-notice');
956 990
957 991 }
958 992
959 993
@@ -1040,8 +1074,11 @@
1040 1074 if (isset($input['email_alert_subject'])) $input['email_alert_subject'] = wp_filter_nohtml_kses($input['email_alert_subject']); else $input['email_alert_subject'] = null;
1041 1075 if (isset($input['recaptcha_public'])) $input['recaptcha_public'] = wp_filter_nohtml_kses($input['recaptcha_public']); else $input['recaptcha_public'] = null;
1042 1076 if (isset($input['recaptcha_private'])) $input['recaptcha_private'] = wp_filter_nohtml_kses($input['recaptcha_private']); else $input['recaptcha_private'] = null;
1043 1077 if (isset($input['usp_recaptcha'])) $input['usp_recaptcha'] = wp_filter_nohtml_kses($input['usp_recaptcha']); else $input['usp_recaptcha'] = null;
1078 + if (isset($input['usp_turnstile'])) $input['usp_turnstile'] = wp_filter_nohtml_kses($input['usp_turnstile']); else $input['usp_turnstile'] = null;
1079 + if (isset($input['turnstile_site_key'])) $input['turnstile_site_key'] = wp_filter_nohtml_kses($input['turnstile_site_key']); else $input['turnstile_site_key'] = null;
1080 + if (isset($input['turnstile_secret_key'])) $input['turnstile_secret_key'] = wp_filter_nohtml_kses($input['turnstile_secret_key']); else $input['turnstile_secret_key'] = null;
1044 1081 if (isset($input['custom_field'])) $input['custom_field'] = wp_filter_nohtml_kses($input['custom_field']); else $input['custom_field'] = null;
1045 1082 if (isset($input['custom_name'])) $input['custom_name'] = wp_filter_nohtml_kses($input['custom_name']); else $input['custom_name'] = null;
1046 1083 if (isset($input['custom_label'])) $input['custom_label'] = wp_filter_nohtml_kses($input['custom_label']); else $input['custom_label'] = null;
1047 1084 if (isset($input['custom_field_2'])) $input['custom_field_2'] = wp_filter_nohtml_kses($input['custom_field_2']); else $input['custom_field_2'] = null;
@@ -1220,16 +1257,16 @@
1220 1257 if (!usp_check_date_expired() && !usp_dismiss_notice_check()) {
1221 1258
1222 1259 ?>
1223 1260
1224 - <div class="notice notice-success notice-margin">
1261 + <div class="notice notice-success notice-lh">
1225 1262 <p>
1226 - <strong><?php esc_html_e('Fall Sale!', 'usp'); ?></strong>
1227 - <?php esc_html_e('Take 25% OFF any of our', 'usp'); ?>
1263 + <strong><?php esc_html_e('☀️ Summer Sale!', 'usp'); ?></strong>
1264 + <?php esc_html_e('Take 35% OFF any of our', 'usp'); ?>
1228 1265 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/"><?php esc_html_e('Pro WordPress plugins', 'usp'); ?></a>
1229 1266 <?php esc_html_e('and', 'usp'); ?>
1230 1267 <a target="_blank" rel="noopener noreferrer" href="https://books.perishablepress.com/"><?php esc_html_e('books', 'usp'); ?></a>.
1231 - <?php esc_html_e('Apply code', 'usp'); ?> <code>FALL2024</code> <?php esc_html_e('at checkout. Sale ends 12/21/24.', 'usp'); ?>
1268 + <?php esc_html_e('Apply code', 'usp'); ?> <code>SUMMER</code> <?php esc_html_e('at checkout. Sale ends 9/20/2026.', 'usp'); ?>
1232 1269 <?php echo usp_dismiss_notice_link(); ?>
1233 1270 </p>
1234 1271 </div>
1235 1272
@@ -1307,9 +1344,9 @@
1307 1344 }
1308 1345
1309 1346 function usp_check_date_expired() {
1310 1347
1311 - $expires = apply_filters('usp_check_date_expired', '2024-12-21');
1348 + $expires = apply_filters('usp_check_date_expired', '2026-09-20');
1312 1349
1313 1350 return (new DateTime() > new DateTime($expires)) ? true : false;
1314 1351
1315 1352 }