PluginProbe
User Submitted Posts – Enable Users to Submit Posts from the Front End / 20230809
User Submitted Posts – Enable Users to Submit Posts from the Front End v20230809
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 / library / plugin-display.php

plugin-display.php in User Submitted Posts – Enable Users to Submit Posts from the Front End 20230809, at library/plugin-display.php

827 lines 61.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // User Submitted Posts - Plugin Display
2
3 if (!defined('ABSPATH')) die();
4
5 function usp_render_form() {
6
7 global $usp_options, $wpdb;
8
9 $version_previous = isset($usp_options['usp_version']) ? esc_attr($usp_options['usp_version']) : USP_VERSION;
10
11 $display_alert = (isset($usp_options['version_alert']) && $usp_options['version_alert']) ? ' style="display:none;"' : ' style="display:block;"';
12
13 $custom_styles = (isset($usp_options['usp_form_version']) && $usp_options['usp_form_version'] !== 'custom') ? 'display: none;' : 'display: block;';
14
15 ?>
16
17 <style type="text/css">#mm-plugin-options .usp-custom-form-info { <?php echo $custom_styles; ?> }</style>
18
19 <div id="mm-plugin-options" class="wrap">
20
21 <h1><?php echo USP_PLUGIN; ?> <small><?php echo 'v'. USP_VERSION; ?></small></h1>
22 <div id="mm-panel-toggle"><a href="#"><?php esc_html_e('Toggle all panels', 'usp'); ?></a></div>
23
24 <form method="post" action="options.php">
25 <?php settings_fields('usp_plugin_options'); ?>
26
27 <div class="metabox-holder">
28 <div class="meta-box-sortables ui-sortable">
29
30 <div id="mm-panel-overview" class="postbox">
31 <h2><?php esc_html_e('Overview', 'usp'); ?></h2>
32 <div class="toggle<?php if (isset($_GET['settings-updated'])) echo ' default-hidden'; ?>">
33 <div class="mm-panel-overview">
34 <p>
35 <strong><abbr title="<?php echo USP_PLUGIN; ?>"><?php esc_html_e('USP', 'usp'); ?></abbr></strong> <?php esc_html_e('enables your visitors to submit posts and upload images from the front-end of your site. ', 'usp'); ?>
36 <?php esc_html_e('For more features and unlimited forms, check out', 'usp'); ?> <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?></a></strong>
37 <?php esc_html_e('&mdash; the ultimate solution for user-generated content.', 'usp'); ?>
38 </p>
39 <ul>
40 <li><a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/plugins/user-submitted-posts/"><?php esc_html_e('Plugin Homepage', 'usp'); ?>&nbsp;&raquo;</a></li>
41 <li><a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/plugins/user-submitted-posts/#installation"><?php esc_html_e('Documentation', 'usp'); ?>&nbsp;&raquo;</a></li>
42 <li><a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/user-submitted-posts/"><?php esc_html_e('Support Forum', 'usp'); ?>&nbsp;&raquo;</a></li>
43 </ul>
44 <p>
45 <?php esc_html_e('If you like this plugin, please', 'usp'); ?>
46 <a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/user-submitted-posts/reviews/?rate=5#new-post" title="<?php esc_attr_e('THANK YOU for your support!', 'usp'); ?>"><?php esc_html_e('give it a 5-star rating', 'usp'); ?>&nbsp;&raquo;</a>
47 </p>
48 <a target="_blank" rel="noopener noreferrer" class="mm-panel-overview-pro" href="https://plugin-planet.com/usp-pro/" title="<?php esc_attr_e('Unlimited front-end forms', 'usp'); ?>"><?php esc_html_e('Get USP Pro', 'usp'); ?></a>
49 </div>
50 </div>
51 </div>
52
53 <div id="mm-panel-primary" class="postbox">
54
55 <h2><?php esc_html_e('Plugin Settings', 'usp'); ?></h2>
56
57 <div class="toggle<?php if (!isset($_GET['settings-updated'])) echo ' default-hidden'; ?>">
58
59 <h3><?php esc_html_e('Form Fields', 'usp'); ?></h3>
60 <div class="mm-table-wrap mm-table-less-padding">
61 <div class="mm-section-desc"><?php esc_html_e('Choose fields to display on the front-end form.', 'usp'); ?></div>
62 <table class="widefat mm-table">
63 <?php
64
65 echo usp_form_field_options(array('usp_name', esc_html__('User Name', 'usp')));
66 echo usp_form_field_options(array('usp_email', esc_html__('User Email', 'usp')));
67 echo usp_form_field_options(array('usp_url', esc_html__('User URL', 'usp')));
68 echo usp_form_field_options(array('usp_title', esc_html__('Post Title', 'usp')));
69 echo usp_form_field_options(array('usp_tags', esc_html__('Post Tags', 'usp')));
70 echo usp_form_field_options(array('usp_category', esc_html__('Post Category', 'usp')));
71 echo usp_form_field_options(array('usp_content', esc_html__('Post Content', 'usp')));
72
73 echo usp_form_field_options_custom('1');
74 echo usp_form_field_options_custom('2');
75 echo usp_form_field_options_captcha();
76 echo usp_form_field_options_recaptcha();
77 echo usp_form_field_options_images();
78
79 ?>
80 <tr>
81 <th class="some-padding" scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
82 <td class="some-padding">
83 <span class="mm-item-caption">
84 <?php esc_html_e('For unlimited fields, check out', 'usp'); ?>
85 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
86 </span>
87 </td>
88 </tr>
89 </table>
90 </div>
91
92 <h3><?php esc_html_e('General Settings', 'usp'); ?></h3>
93 <div class="mm-table-wrap">
94 <div class="mm-section-desc"><?php esc_html_e('Configure general settings. Note: the default settings work fine for most cases.', 'usp'); ?></div>
95 <table class="widefat mm-table">
96 <tr>
97 <th scope="row"><label class="description" for="usp_options[usp_form_version]"><?php esc_html_e('Form Style', 'usp'); ?></label></th>
98 <td>
99 <?php echo usp_form_display_options(); ?>
100
101 <div class="usp-custom-form-info">
102 <p><?php esc_html_e('With this option, you can copy the plugin&rsquo;s default templates:', 'usp'); ?></p>
103 <ul>
104 <li><code>/resources/usp.css</code></li>
105 <li><code>/views/submission-form.php</code></li>
106 </ul>
107 <p><?php esc_html_e('..and upload them into a directory named', 'usp'); ?> <code>/usp/</code> <?php esc_html_e('in your theme:', 'usp'); ?></p>
108 <ul>
109 <li><code>/wp-content/themes/your-theme/usp/usp.css</code></li>
110 <li><code>/wp-content/themes/your-theme/usp/submission-form.php</code></li>
111 </ul>
112 <p>
113 <?php esc_html_e('That will enable you to customize the form and styles as desired. For more info, check out the "Custom Submission Form" section in the', 'usp'); ?>
114 <a target="_blank" rel="noopener noreferrer" href="https://wordpress.org/plugins/user-submitted-posts/#installation"><?php esc_html_e('Installation Docs', 'usp'); ?></a>.
115 <?php esc_html_e('FYI: here is a', 'usp'); ?> <a target="_blank" rel="noopener noreferrer" href="https://m0n.co/e"><?php esc_html_e('list of USP CSS selectors', 'usp'); ?>&nbsp;&raquo;</a>
116 </p>
117 </div>
118 </td>
119 </tr>
120 <tr>
121 <th scope="row"><label class="description" for="usp_options[usp_include_js]"><?php esc_html_e('Include JavaScript', 'usp'); ?></label></th>
122 <td><input type="checkbox" value="1" name="usp_options[usp_include_js]" <?php if (isset($usp_options['usp_include_js'])) checked('1', $usp_options['usp_include_js']); ?> />
123 <span class="mm-item-caption"><?php esc_html_e('Include required JavaScript files (recommended)', 'usp'); ?></span></td>
124 </tr>
125 <tr>
126 <th scope="row"><label class="description" for="usp_options[usp_display_url]"><?php esc_html_e('Targeted Loading', 'usp'); ?></label></th>
127 <td><input type="text" size="45" maxlength="200" name="usp_options[usp_display_url]" value="<?php if (isset($usp_options['usp_display_url'])) echo esc_attr($usp_options['usp_display_url']); ?>" />
128 <div class="mm-item-caption"><?php esc_html_e('By default, CSS &amp; JavaScript files are loaded on every page. To load only on specific page(s), enter the URL(s) here. Use commas to separate multiple URLs. Leave blank to load on all pages.', 'usp'); ?></div></td>
129 </tr>
130 <tr>
131 <th scope="row"><label class="description" for="usp_options[usp_post_type]"><?php esc_html_e('Post Type', 'usp'); ?></label></th>
132 <td>
133 <?php echo usp_post_type_options(); ?>
134 <span class="mm-item-caption"><?php esc_html_e('Post Type for submitted posts', 'usp'); ?></span>
135 </td>
136 </tr>
137 <tr>
138 <th scope="row"><label class="description" for="usp_options[number-approved]"><?php esc_html_e('Post Status', 'usp'); ?></label></th>
139 <td>
140 <?php echo usp_post_status_options(); ?>
141 <span class="mm-item-caption"><?php esc_html_e('Post Status for submitted posts', 'usp'); ?></span>
142 </td>
143 </tr>
144 <tr>
145 <th scope="row"><label class="description" for="usp_options[redirect-url]"><?php esc_html_e('Redirect URL', 'usp'); ?></label></th>
146 <td><input type="text" size="45" maxlength="200" name="usp_options[redirect-url]" value="<?php if (isset($usp_options['redirect-url'])) echo esc_attr($usp_options['redirect-url']); ?>" />
147 <div class="mm-item-caption"><?php esc_html_e('Redirect user to this URL after post submission (leave blank to stay on current page)', 'usp'); ?></div></td>
148 </tr>
149 <tr>
150 <th scope="row"><label class="description" for="usp_options[success-message]"><?php esc_html_e('Success Message', 'usp'); ?></label></th>
151 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[success-message]"><?php if (isset($usp_options['success-message'])) echo esc_textarea($usp_options['success-message']); ?></textarea>
152 <div class="mm-item-caption"><?php esc_html_e('Message displayed after successful post submission (basic markup allowed)', 'usp'); ?></div></td>
153 </tr>
154 <tr>
155 <th scope="row"><label class="description" for="usp_options[error-message]"><?php esc_html_e('Error Message', 'usp'); ?></label></th>
156 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[error-message]"><?php if (isset($usp_options['error-message'])) echo esc_textarea($usp_options['error-message']); ?></textarea>
157 <div class="mm-item-caption"><?php esc_html_e('Error message displayed if post submission fails (basic markup allowed)', 'usp'); ?></div></td>
158 </tr>
159 <tr>
160 <th scope="row"><label class="description" for="usp_options[usp_form_content]"><?php esc_html_e('Custom Content', 'usp'); ?></label></th>
161 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[usp_form_content]"><?php if (isset($usp_options['usp_form_content'])) echo esc_textarea($usp_options['usp_form_content']); ?></textarea>
162 <div class="mm-item-caption"><?php esc_html_e('Optional markup/text to include before the submission form (leave blank to disable)', 'usp'); ?></div></td>
163 </tr>
164 <tr>
165 <th scope="row"><label class="description" for="usp_options[usp_richtext_editor]"><?php esc_html_e('Rich Text Editor', 'usp'); ?></label></th>
166 <td><input type="checkbox" value="1" name="usp_options[usp_richtext_editor]" <?php if (isset($usp_options['usp_richtext_editor'])) checked('1', $usp_options['usp_richtext_editor']); ?> />
167 <span class="mm-item-caption"><?php esc_html_e('Enable RTE/Visual Editor for the Post Content field', 'usp'); ?></span></td>
168 </tr>
169 <tr>
170 <th scope="row"><label class="description" for="usp_options[titles_unique]"><?php esc_html_e('Unique Titles', 'usp'); ?></label></th>
171 <td><input type="checkbox" value="1" name="usp_options[titles_unique]" <?php if (isset($usp_options['titles_unique'])) checked('1', $usp_options['titles_unique']); ?> />
172 <span class="mm-item-caption"><?php esc_html_e('Require submitted post titles to be unique (useful for preventing multiple/duplicate posts)', 'usp'); ?></span></td>
173 </tr>
174 <tr>
175 <th scope="row"><label class="description" for="usp_options[disable_required]"><?php esc_html_e('Disable Required', 'usp'); ?></label></th>
176 <td><input type="checkbox" value="1" name="usp_options[disable_required]" <?php if (isset($usp_options['disable_required'])) checked('1', $usp_options['disable_required']); ?> />
177 <span class="mm-item-caption"><?php esc_html_e('Disable all required attributes on form fields (useful for troubleshooting error messages)', 'usp'); ?></span></td>
178 </tr>
179 <tr>
180 <th scope="row"><label class="description" for="usp_options[disable_ip_tracking]"><?php esc_html_e('Disable IP Tracking', 'usp'); ?></label></th>
181 <td><input type="checkbox" value="1" name="usp_options[disable_ip_tracking]" <?php if (isset($usp_options['disable_ip_tracking'])) checked('1', $usp_options['disable_ip_tracking']); ?> />
182 <span class="mm-item-caption"><?php esc_html_e('Do not collect or store any user IP address (useful for complying with privacy regulations)', 'usp'); ?></span></td>
183 </tr>
184 <tr>
185 <th scope="row"><label class="description" for="usp_options[enable_shortcodes]"><?php esc_html_e('Enable Shortcodes', 'usp'); ?></label></th>
186 <td><input name="usp_options[enable_shortcodes]" type="checkbox" value="1" <?php if (isset($usp_options['enable_shortcodes'])) checked('1', $usp_options['enable_shortcodes']); ?> />
187 <span class="mm-item-caption"><?php esc_html_e('Enable shortcodes in widgets. By default, WordPress does not enable shortcodes in widgets. ', 'usp'); ?>
188 <?php esc_html_e('This setting enables any/all shortcodes in widgets (even shortcodes from other plugins).', 'usp'); ?></span></td>
189 </tr>
190 <tr>
191 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
192 <td>
193 <span class="mm-item-caption">
194 <?php esc_html_e('For more options and features, check out', 'usp'); ?>
195 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
196 </span>
197 </td>
198 </tr>
199 </table>
200 </div>
201
202 <h3><?php esc_html_e('User Settings', 'usp'); ?></h3>
203 <div class="mm-table-wrap">
204 <div class="mm-section-desc"><?php esc_html_e('Configure user settings.', 'usp'); ?></div>
205 <table class="widefat mm-table">
206 <tr>
207 <th scope="row"><label class="description" for="usp_options[author]"><?php esc_html_e('Assigned Author', 'usp'); ?></label></th>
208 <td>
209 <?php echo usp_post_author_options(); ?>
210 <span class="mm-item-caption"><?php esc_html_e('Specify the user that should be assigned as author for submitted posts', 'usp'); ?></span>
211 </td>
212 </tr>
213 <tr>
214 <th scope="row"><label class="description" for="usp_options[usp_use_author]"><?php esc_html_e('Registered Username', 'usp'); ?></label></th>
215 <td><input type="checkbox" value="1" name="usp_options[usp_use_author]" <?php if (isset($usp_options['usp_use_author'])) checked('1', $usp_options['usp_use_author']); ?> />
216 <span class="mm-item-caption"><?php esc_html_e('Use the user&rsquo;s registered username for the Name field (valid when the user is logged in to WordPress)', 'usp'); ?></span></td>
217 </tr>
218 <tr>
219 <th scope="row"><label class="description" for="usp_options[usp_use_email]"><?php esc_html_e('Registered Email', 'usp'); ?></label></th>
220 <td><input type="checkbox" value="1" name="usp_options[usp_use_email]" <?php if (isset($usp_options['usp_use_email'])) checked('1', $usp_options['usp_use_email']); ?> />
221 <span class="mm-item-caption"><?php esc_html_e('Use the user&rsquo;s registered email as the value of the Email field (valid when the user is logged in to WordPress)', 'usp'); ?></span></td>
222 </tr>
223 <tr>
224 <th scope="row"><label class="description" for="usp_options[usp_use_url]"><?php esc_html_e('Registered URL', 'usp'); ?></label></th>
225 <td><input type="checkbox" value="1" name="usp_options[usp_use_url]" <?php if (isset($usp_options['usp_use_url'])) checked('1', $usp_options['usp_use_url']); ?> />
226 <span class="mm-item-caption"><?php esc_html_e('Use the user&rsquo;s Profile URL as the value of the URL field (valid when the user is logged in to WordPress)', 'usp'); ?></span></td>
227 </tr>
228 <tr>
229 <th scope="row"><label class="description" for="usp_options[logged_in_users]"><?php esc_html_e('Require User Login', 'usp'); ?></label></th>
230 <td><input type="checkbox" value="1" name="usp_options[logged_in_users]" <?php if (isset($usp_options['logged_in_users'])) checked('1', $usp_options['logged_in_users']); ?> />
231 <span class="mm-item-caption"><?php esc_html_e('Require users to be logged in to WordPress to view/submit the form', 'usp'); ?></span></td>
232 </tr>
233 <tr>
234 <th scope="row"><label class="description" for="usp_options[disable_author]"><?php esc_html_e('Disable Replace Author', 'usp'); ?></label></th>
235 <td><input type="checkbox" value="1" name="usp_options[disable_author]" <?php if (isset($usp_options['disable_author'])) checked('1', $usp_options['disable_author']); ?> />
236 <span class="mm-item-caption"><?php esc_html_e('Do not replace post author with submitted user name', 'usp'); ?></span></td>
237 </tr>
238 <tr>
239 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
240 <td>
241 <span class="mm-item-caption">
242 <?php esc_html_e('For more options and features, check out', 'usp'); ?>
243 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
244 </span>
245 </td>
246 </tr>
247 </table>
248 </div>
249
250 <h3><?php esc_html_e('Email Alerts', 'usp'); ?></h3>
251 <div class="mm-table-wrap">
252 <div class="mm-section-desc"><?php esc_html_e('Configure email notifications for new submitted posts.', 'usp'); ?></div>
253 <table class="widefat mm-table">
254 <tr>
255 <th scope="row"><label class="description" for="usp_options[usp_email_alerts]"><?php esc_html_e('Receive Email Alert', 'usp'); ?></label></th>
256 <td><input type="checkbox" value="1" name="usp_options[usp_email_alerts]" <?php if (isset($usp_options['usp_email_alerts'])) checked('1', $usp_options['usp_email_alerts']); ?> />
257 <span class="mm-item-caption"><?php esc_html_e('Send email alerts for new post submissions', 'usp'); ?></span></td>
258 </tr>
259 <tr>
260 <th scope="row"><label class="description" for="usp_options[usp_email_html]"><?php esc_html_e('Enable HTML Format', 'usp'); ?></label></th>
261 <td><input type="checkbox" value="1" name="usp_options[usp_email_html]" <?php if (isset($usp_options['usp_email_html'])) checked('1', $usp_options['usp_email_html']); ?> />
262 <span class="mm-item-caption"><?php esc_html_e('Enable HTML format for email alert messages', 'usp'); ?></span></td>
263 </tr>
264 <tr>
265 <th scope="row"><label class="description" for="usp_options[usp_email_address]"><?php esc_html_e('Email Address for Alerts', 'usp'); ?></label></th>
266 <td><input type="text" size="45" maxlength="200" name="usp_options[usp_email_address]" value="<?php if (isset($usp_options['usp_email_address'])) echo esc_attr($usp_options['usp_email_address']); ?>" />
267 <div class="mm-item-caption"><?php esc_html_e('Additional recipients for email alerts. Use commas to separate multiple addresses.', 'usp'); ?></div></td>
268 </tr>
269 <tr>
270 <th scope="row"><label class="description" for="usp_options[usp_email_from]"><?php esc_html_e('Email &ldquo;From&rdquo; Address', 'usp'); ?></label></th>
271 <td><input type="text" size="45" maxlength="200" name="usp_options[usp_email_from]" value="<?php if (isset($usp_options['usp_email_from'])) echo esc_attr($usp_options['usp_email_from']); ?>" />
272 <div class="mm-item-caption"><?php esc_html_e('Custom address for the email &ldquo;From&rdquo; header (see plugin FAQs for info).', 'usp'); ?>
273 <?php esc_html_e('If multiple addresses are specified for the previous setting, include an equal number of addresses for this setting (in the same order).', 'usp'); ?></div></td>
274 </tr>
275 <tr>
276 <th scope="row"><label class="description" for="usp_options[email_alert_subject]"><?php esc_html_e('Email Alert Subject', 'usp'); ?></label></th>
277 <td><input type="text" size="45" name="usp_options[email_alert_subject]" value="<?php if (isset($usp_options['email_alert_subject'])) echo esc_attr($usp_options['email_alert_subject']); ?>" />
278 <div class="mm-item-caption"><?php esc_html_e('Subject line for email alerts. Leave blank to use default subject line. You may include any of the following variables:', 'usp'); ?>
279 <code>%%post_title%%</code>, <code>%%post_content%%</code>, <code>%%post_author%%</code>, <code>%%blog_name%%</code>, <code>%%blog_url%%</code>, <code>%%post_url%%</code>, <code>%%admin_url%%</code>,
280 <code>%%edit_link%%</code>, <code>%%delete_link%%</code>, <code>%%user_email%%</code>, <code>%%user_url%%</code>, <code>%%custom_field%%</code>, <code>%%custom_field_2%%</code></div></td>
281 </tr>
282 <tr>
283 <th scope="row"><label class="description" for="usp_options[email_alert_message]"><?php esc_html_e('Email Alert Message', 'usp'); ?></label></th>
284 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[email_alert_message]"><?php if (isset($usp_options['email_alert_message'])) echo esc_textarea($usp_options['email_alert_message']); ?></textarea>
285 <div class="mm-item-caption"><?php esc_html_e('Message for email alerts. Leave blank to use default message. You may include any of the following variables:', 'usp'); ?>
286 <code>%%post_title%%</code>, <code>%%post_content%%</code>, <code>%%post_author%%</code>, <code>%%blog_name%%</code>, <code>%%blog_url%%</code>, <code>%%post_url%%</code>, <code>%%admin_url%%</code>,
287 <code>%%edit_link%%</code>, <code>%%delete_link%%</code>, <code>%%user_email%%</code>, <code>%%user_url%%</code>, <code>%%custom_field%%</code>, <code>%%custom_field_2%%</code></div></td>
288 </tr>
289 <tr>
290 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
291 <td>
292 <span class="mm-item-caption">
293 <?php esc_html_e('For more', 'usp'); ?>
294 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-include-post-info-email-alert/"><?php esc_html_e('email-alert options', 'usp'); ?></a>,
295 <?php esc_html_e('check out', 'usp'); ?>
296 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
297 </span>
298 </td>
299 </tr>
300 </table>
301 </div>
302
303 <h3><?php esc_html_e('Categories &amp; Tags', 'usp'); ?></h3>
304 <div class="mm-table-wrap">
305 <div class="mm-section-desc"><?php esc_html_e('Configure settings for the Category and Tag fields.', 'usp'); ?></div>
306 <table class="widefat mm-table">
307 <tr>
308 <th scope="row"><label class="description"><?php esc_html_e('Categories', 'usp'); ?></label></th>
309 <td>
310 <div class="mm-item-desc usp-cat-toggle-link"><a href="#"><?php esc_html_e('Show categories', 'usp'); ?></a></div>
311 <div class="usp-cat-toggle-div default-hidden"><?php echo usp_post_category_options(); ?></div>
312 </td>
313 </tr>
314 <tr>
315 <th scope="row"><label class="description" for="usp_options[multiple-cats]"><?php esc_html_e('Multiple Categories', 'usp'); ?></label></th>
316 <td><input type="checkbox" value="1" name="usp_options[multiple-cats]" <?php if (isset($usp_options['multiple-cats'])) checked('1', $usp_options['multiple-cats']); ?> />
317 <span class="mm-item-caption"><?php esc_html_e('Enable users to select multiple categories', 'usp'); ?></span></td>
318 </tr>
319 <tr>
320 <th scope="row"><label class="description" for="usp_options[usp_use_cat]"><?php esc_html_e('Hidden/Default Category', 'usp'); ?></label></th>
321 <td><input type="checkbox" value="1" name="usp_options[usp_use_cat]" <?php if (isset($usp_options['usp_use_cat'])) checked('1', $usp_options['usp_use_cat']); ?> />
322 <span class="mm-item-caption"><?php esc_html_e('Use a hidden field for the post category. This hides the category field and sets its value via the next option.', 'usp'); ?></span></td>
323 </tr>
324 <tr>
325 <th scope="row"><label class="description" for="usp_options[usp_use_cat_id]"><?php esc_html_e('Category ID for Hidden Field', 'usp'); ?></label></th>
326 <td><input class="usp-input-short" type="text" size="45" maxlength="100" name="usp_options[usp_use_cat_id]" value="<?php if (isset($usp_options['usp_use_cat_id'])) echo esc_attr($usp_options['usp_use_cat_id']); ?>" />
327 <span class="mm-item-caption"><?php esc_html_e('Specify category ID(s) to use for &ldquo;Hidden/Default Category&rdquo; (separate multiple IDs with commas)', 'usp'); ?></span></td>
328 </tr>
329 <tr>
330 <th scope="row"><label class="description" for="usp_options[usp_existing_tags]"><?php esc_html_e('Use Existing Tags', 'usp'); ?></label></th>
331 <td><input type="checkbox" value="1" name="usp_options[usp_existing_tags]" <?php if (isset($usp_options['usp_existing_tags'])) checked('1', $usp_options['usp_existing_tags']); ?> />
332 <span class="mm-item-caption"><?php esc_html_e('Display a select/dropdown menu of existing tags (valid when Tag field is displayed on the form)', 'usp'); ?></span></td>
333 </tr>
334 <tr>
335 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
336 <td>
337 <span class="mm-item-caption">
338 <?php esc_html_e('For more', 'usp'); ?>
339 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-add-categories/"><?php esc_html_e('category', 'usp'); ?></a> <?php esc_html_e('and', 'usp'); ?>
340 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-add-tags/"><?php esc_html_e('tag', 'usp'); ?></a> <?php esc_html_e('options, check out', 'usp'); ?>
341 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
342 </span>
343 </td>
344 </tr>
345 </table>
346 </div>
347
348 <h3 id="usp-custom-field-1"><?php esc_html_e('Custom Field 1', 'usp'); ?></h3>
349 <div class="mm-table-wrap">
350 <div class="mm-section-desc"><?php esc_html_e('Configure Custom Field #1.', 'usp'); ?></div>
351 <table class="widefat mm-table">
352 <tr>
353 <th scope="row"><label class="description" for="usp_options[custom_name]"><?php esc_html_e('Custom Field Name', 'usp'); ?></label></th>
354 <td><input type="text" size="45" name="usp_options[custom_name]" value="<?php if (isset($usp_options['custom_name'])) echo esc_attr($usp_options['custom_name']); ?>" />
355 <div class="mm-item-caption"><?php esc_html_e('Use only alphanumeric, underscores, and dashes. If unsure, use the default name:', 'usp'); ?> <code>usp_custom_field</code></div></td>
356 </tr>
357 <tr>
358 <th scope="row"><label class="description" for="usp_options[custom_label]"><?php esc_html_e('Custom Field Label', 'usp'); ?></label></th>
359 <td><input type="text" size="45" name="usp_options[custom_label]" value="<?php if (isset($usp_options['custom_label'])) echo esc_attr($usp_options['custom_label']); ?>" />
360 <div class="mm-item-caption"><?php esc_html_e('This will be displayed as the field label on the form. Default: Custom Field 1', 'usp'); ?></div></td>
361 </tr>
362 <tr>
363 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
364 <td>
365 <span class="mm-item-caption">
366 <?php esc_html_e('For', 'usp'); ?>
367 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-custom-fields/"><?php esc_html_e('unlimited custom fields', 'usp'); ?></a>,
368 <?php esc_html_e('check out', 'usp'); ?>
369 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
370 </span>
371 </td>
372 </tr>
373 </table>
374 </div>
375
376 <h3 id="usp-custom-field-2"><?php esc_html_e('Custom Field 2', 'usp'); ?></h3>
377 <div class="mm-table-wrap">
378 <div class="mm-section-desc"><?php esc_html_e('Configure Custom Field #2.', 'usp'); ?></div>
379 <table class="widefat mm-table">
380 <tr>
381 <th scope="row"><label class="description" for="usp_options[custom_name_2]"><?php esc_html_e('Custom Field Name', 'usp'); ?></label></th>
382 <td><input type="text" size="45" name="usp_options[custom_name_2]" value="<?php if (isset($usp_options['custom_name_2'])) echo esc_attr($usp_options['custom_name_2']); ?>" />
383 <div class="mm-item-caption"><?php esc_html_e('Use only alphanumeric, underscores, and dashes. If unsure, use the default name:', 'usp'); ?> <code>usp_custom_field_2</code></div></td>
384 </tr>
385 <tr>
386 <th scope="row"><label class="description" for="usp_options[custom_label_2]"><?php esc_html_e('Custom Field Label', 'usp'); ?></label></th>
387 <td><input type="text" size="45" name="usp_options[custom_label_2]" value="<?php if (isset($usp_options['custom_label_2'])) echo esc_attr($usp_options['custom_label_2']); ?>" />
388 <div class="mm-item-caption"><?php esc_html_e('This will be displayed as the field label on the form. Default: Custom Field 2', 'usp'); ?></div></td>
389 </tr>
390 <tr>
391 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
392 <td>
393 <span class="mm-item-caption">
394 <?php esc_html_e('For', 'usp'); ?>
395 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-custom-fields/"><?php esc_html_e('unlimited custom fields', 'usp'); ?></a>,
396 <?php esc_html_e('check out', 'usp'); ?>
397 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
398 </span>
399 </td>
400 </tr>
401 </table>
402 </div>
403
404 <h3><?php esc_html_e('Custom Checkbox', 'usp'); ?></h3>
405 <div class="mm-table-wrap">
406 <div class="mm-section-desc"><?php esc_html_e('By default, this displays an &ldquo;Agree to Terms&rdquo; checkbox. Customize as desired.', 'usp'); ?></div>
407 <table class="widefat mm-table">
408 <tr>
409 <th scope="row"><label class="description" for="usp_options[custom_checkbox]"><?php esc_html_e('Display Checkbox', 'usp'); ?></label></th>
410 <td><input type="checkbox" value="1" name="usp_options[custom_checkbox]" <?php if (isset($usp_options['custom_checkbox'])) checked('1', $usp_options['custom_checkbox']); ?> />
411 <span class="mm-item-caption"><?php esc_html_e('Display custom checkbox on the submission form', 'usp'); ?></span></td>
412 </tr>
413 <tr>
414 <th scope="row"><label class="description" for="usp_options[custom_checkbox_name]"><?php esc_html_e('Checkbox Name', 'usp'); ?></label></th>
415 <td><input type="text" size="45" maxlength="200" name="usp_options[custom_checkbox_name]" value="<?php if (isset($usp_options['custom_checkbox_name'])) echo esc_attr($usp_options['custom_checkbox_name']); ?>" />
416 <div class="mm-item-caption"><?php esc_html_e('Use only alphanumeric, underscores, and dashes. If unsure, use the default name:', 'usp'); ?> <code>usp_custom_checkbox</code></div></td>
417 </tr>
418 <tr>
419 <th scope="row"><label class="description" for="usp_options[custom_checkbox_err]"><?php esc_html_e('Checkbox Error', 'usp'); ?></label></th>
420 <td><input type="text" size="45" maxlength="200" name="usp_options[custom_checkbox_err]" value="<?php if (isset($usp_options['custom_checkbox_err'])) echo esc_attr($usp_options['custom_checkbox_err']); ?>" />
421 <div class="mm-item-caption"><?php esc_html_e('Error message displayed if user does not check the box', 'usp'); ?></div></td>
422 </tr>
423 <tr>
424 <th scope="row"><label class="description" for="usp_options[custom_checkbox_text]"><?php esc_html_e('Checkbox Text', 'usp'); ?></label></th>
425 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[custom_checkbox_text]"><?php if (isset($usp_options['custom_checkbox_text'])) echo esc_textarea($usp_options['custom_checkbox_text']); ?></textarea>
426 <div class="mm-item-caption"><?php esc_html_e('Text displayed next to checkbox. Tip: use curly brackets to output angle brackets, for example:', 'usp'); ?> <code>{img}</code> = <code>&lt;img&gt;</code></div></td>
427 </tr>
428 <tr>
429 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
430 <td>
431 <span class="mm-item-caption">
432 <?php esc_html_e('For', 'usp'); ?>
433 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-custom-checkbox-fields/"><?php esc_html_e('unlimited checkbox fields', 'usp'); ?></a>,
434 <?php esc_html_e('check out', 'usp'); ?>
435 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
436 </span>
437 </td>
438 </tr>
439 </table>
440 </div>
441
442 <h3 id="usp-challenge-question"><?php esc_html_e('Challenge Question', 'usp'); ?></h3>
443 <div class="mm-table-wrap">
444 <div class="mm-section-desc"><?php esc_html_e('Add a challenge question to help stop spam. Tip: make the question easy to answer for any human.', 'usp'); ?></div>
445 <table class="widefat mm-table">
446 <tr>
447 <th scope="row"><label class="description" for="usp_options[usp_question]"><?php esc_html_e('Challenge Question', 'usp'); ?></label></th>
448 <td><input type="text" size="45" name="usp_options[usp_question]" value="<?php if (isset($usp_options['usp_question'])) echo esc_attr($usp_options['usp_question']); ?>" />
449 <div class="mm-item-caption"><?php esc_html_e('To prevent spam, enter a question that users must answer before submitting the form', 'usp'); ?></div></td>
450 </tr>
451 <tr>
452 <th scope="row"><label class="description" for="usp_options[usp_response]"><?php esc_html_e('Challenge Response', 'usp'); ?></label></th>
453 <td><input type="text" size="45" name="usp_options[usp_response]" value="<?php if (isset($usp_options['usp_response'])) echo esc_attr($usp_options['usp_response']); ?>" />
454 <div class="mm-item-caption"><?php esc_html_e('Enter the *only* correct answer to the challenge question', 'usp'); ?></div></td>
455 </tr>
456 <tr>
457 <th scope="row"><label class="description" for="usp_options[usp_casing]"><?php esc_html_e('Case-sensitivity', 'usp'); ?></label></th>
458 <td><input type="checkbox" value="1" name="usp_options[usp_casing]" <?php if (isset($usp_options['usp_casing'])) checked('1', $usp_options['usp_casing']); ?> />
459 <span class="mm-item-caption"><?php esc_html_e('Make the challenge response case-sensitive', 'usp'); ?></span></td>
460 </tr>
461 </table>
462 </div>
463
464 <h3 id="usp-recaptcha"><?php esc_html_e('Google reCaptcha', 'usp'); ?></h3>
465 <div class="mm-table-wrap">
466 <div class="mm-section-desc"><?php esc_html_e('To enable Google reCaptcha, enter your public and private keys.', 'usp'); ?></div>
467 <table class="widefat mm-table">
468 <tr>
469 <th scope="row"><label class="description" for="usp_options[recaptcha_public]"><?php esc_html_e('Public Key', 'usp'); ?></label></th>
470 <td><input type="text" size="45" name="usp_options[recaptcha_public]" value="<?php if (isset($usp_options['recaptcha_public'])) echo esc_attr($usp_options['recaptcha_public']); ?>" />
471 <div class="mm-item-caption"><?php esc_html_e('Enter your Public Key', 'usp'); ?></div></td>
472 </tr>
473 <tr>
474 <th scope="row"><label class="description" for="usp_options[recaptcha_private]"><?php esc_html_e('Private Key', 'usp'); ?></label></th>
475 <td><input type="text" size="45" name="usp_options[recaptcha_private]" value="<?php if (isset($usp_options['recaptcha_private'])) echo esc_attr($usp_options['recaptcha_private']); ?>" />
476 <div class="mm-item-caption"><?php esc_html_e('Enter your Private Key', 'usp'); ?></div></td>
477 </tr>
478 <tr>
479 <th scope="row"><label class="description" for="usp_options[recaptcha_version]"><?php esc_html_e('reCaptcha Version', 'usp'); ?></label></th>
480 <td>
481 <?php echo usp_form_field_recaptcha(); ?>
482 <span class="mm-item-caption"><?php esc_html_e('Choose reCaptcha version', 'usp'); ?></span>
483 </td>
484 </tr>
485 </table>
486 </div>
487
488 <h3 id="usp-image-uploads"><?php esc_html_e('Image Uploads', 'usp'); ?></h3>
489 <div class="mm-table-wrap">
490 <div class="mm-section-desc"><?php esc_html_e('Configure settings for image uploads.', 'usp'); ?></div>
491 <table class="widefat mm-table">
492 <tr>
493 <th scope="row"><label class="description" for="usp_options[usp_featured_images]"><?php esc_html_e('Featured Image', 'usp'); ?></label></th>
494 <td><input type="checkbox" value="1" name="usp_options[usp_featured_images]" <?php if (isset($usp_options['usp_featured_images'])) checked('1', $usp_options['usp_featured_images']); ?> />
495 <span class="mm-item-caption"><?php esc_html_e('Use submitted images as Featured Images. Requires theme support for Featured Images (aka Post Thumbnails)', 'usp'); ?></span></td>
496 </tr>
497 <tr>
498 <th scope="row"><label class="description" for="usp_options[usp_featured_image_default]"><?php esc_html_e('Default Featured Image', 'usp'); ?></label></th>
499 <td>
500 <input id="upload_image" class="usp-upload-image" type="text" size="36" name="usp_options[usp_featured_image_default]" value="<?php if (isset($usp_options['usp_featured_image_default'])) echo esc_attr($usp_options['usp_featured_image_default']); ?>" />
501 <input id="upload_image_button" class="button" type="button" value="Upload Image" />
502 <div class="mm-item-caption"><?php esc_html_e('Enter URL or click button to upload/choose an image (optional)', 'usp'); ?></div>
503 </td>
504 </tr>
505 <tr>
506 <th scope="row"><label class="description" for="usp_options[upload-message]"><?php esc_html_e('Upload Message', 'usp'); ?></label></th>
507 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[upload-message]"><?php if (isset($usp_options['upload-message'])) echo esc_textarea($usp_options['upload-message']); ?></textarea>
508 <div class="mm-item-caption"><?php esc_html_e('Message displayed next to the file upload field (basic markup allowed)', 'usp'); ?></div></td>
509 </tr>
510 <tr>
511 <th scope="row"><label class="description" for="usp_options[usp_add_another]"><?php esc_html_e('&ldquo;Add another image&rdquo; link', 'usp'); ?></label></th>
512 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[usp_add_another]"><?php if (isset($usp_options['usp_add_another'])) echo esc_textarea($usp_options['usp_add_another']); ?></textarea>
513 <div class="mm-item-caption"><?php esc_html_e('Custom markup for the &ldquo;Add another image&rdquo; link. Leave blank to use the default markup (recommended).', 'usp'); ?></div></td>
514 </tr>
515 <tr>
516 <th scope="row"><label class="description" for="usp_options[min-images]"><?php esc_html_e('Minimum number of images', 'usp'); ?></label></th>
517 <td><input name="usp_options[min-images]" type="number" class="small-text" step="1" min="0" max="999" maxlength="3" value="<?php if (isset($usp_options['min-images'])) echo esc_attr($usp_options['min-images']); ?>" />
518 <span class="mm-item-caption"><?php esc_html_e('Minimum number of images for each submitted post', 'usp'); ?></span></td>
519 </tr>
520 <tr>
521 <th scope="row"><label class="description" for="usp_options[max-images]"><?php esc_html_e('Maximum number of images', 'usp'); ?></label></th>
522 <td><input name="usp_options[max-images]" type="number" class="small-text" step="1" min="0" max="999" maxlength="3" value="<?php if (isset($usp_options['max-images'])) echo esc_attr($usp_options['max-images']); ?>" />
523 <span class="mm-item-caption"><?php esc_html_e('Maximum number of images for each submitted post', 'usp'); ?></span></td>
524 </tr>
525 <tr>
526 <th scope="row"><label class="description" for="usp_options[min-image-width]"><?php esc_html_e('Minimum image width', 'usp'); ?></label></th>
527 <td><input name="usp_options[min-image-width]" type="number" class="small-text" step="1" min="0" max="999999999" maxlength="9" value="<?php if (isset($usp_options['min-image-width'])) echo esc_attr($usp_options['min-image-width']); ?>" />
528 <span class="mm-item-caption"><?php esc_html_e('Minimum width (in pixels) for uploaded images', 'usp'); ?></span></td>
529 </tr>
530 <tr>
531 <th scope="row"><label class="description" for="usp_options[min-image-height]"><?php esc_html_e('Minimum image height', 'usp'); ?></label></th>
532 <td><input name="usp_options[min-image-height]" type="number" class="small-text" step="1" min="0" max="999999999" maxlength="9" value="<?php if (isset($usp_options['min-image-height'])) echo esc_attr($usp_options['min-image-height']); ?>" />
533 <span class="mm-item-caption"><?php esc_html_e('Minimum height (in pixels) for uploaded images', 'usp'); ?></span></td>
534 </tr>
535 <tr>
536 <th scope="row"><label class="description" for="usp_options[max-image-width]"><?php esc_html_e('Maximum image width', 'usp'); ?></label></th>
537 <td><input name="usp_options[max-image-width]" type="number" class="small-text" step="1" min="0" max="999999999" maxlength="9" value="<?php if (isset($usp_options['max-image-width'])) echo esc_attr($usp_options['max-image-width']); ?>" />
538 <span class="mm-item-caption"><?php esc_html_e('Maximum width (in pixels) for uploaded images', 'usp'); ?></span></td>
539 </tr>
540 <tr>
541 <th scope="row"><label class="description" for="usp_options[max-image-height]"><?php esc_html_e('Maximum image height', 'usp'); ?></label></th>
542 <td><input name="usp_options[max-image-height]" type="number" class="small-text" step="1" min="0" max="999999999" maxlength="9" value="<?php if (isset($usp_options['max-image-height'])) echo esc_attr($usp_options['max-image-height']); ?>" />
543 <span class="mm-item-caption"><?php esc_html_e('Maximum height (in pixels) for uploaded images', 'usp'); ?></span></td>
544 </tr>
545 <tr>
546 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
547 <td>
548 <span class="mm-item-caption">
549 <?php esc_html_e('Enable users to upload other file types (like PDF, Word, Zip, videos, and more), check out', 'usp'); ?>
550 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
551 </span>
552 </td>
553 </tr>
554 </table>
555 </div>
556
557 <h3><?php esc_html_e('Front-end Display', 'usp'); ?></h3>
558 <div class="mm-table-wrap">
559 <div class="mm-section-desc"><?php esc_html_e('Automatically display images and more.', 'usp'); ?></div>
560 <table class="widefat mm-table">
561 <tr>
562 <th scope="row"><label class="description" for="usp_options[auto_display_images]"><?php esc_html_e('Image Display', 'usp'); ?></label></th>
563 <td>
564 <div class="mm-item-desc"><?php esc_html_e('Display submitted images:', 'usp'); ?></div>
565 <?php echo usp_auto_display_options('images'); ?>
566 </td>
567 </tr>
568 <tr>
569 <th scope="row"><label class="description" for="usp_options[auto_image_markup]"><?php esc_html_e('Image Markup', 'usp'); ?></label></th>
570 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[auto_image_markup]"><?php if (isset($usp_options['auto_image_markup'])) echo esc_textarea($usp_options['auto_image_markup']); ?></textarea>
571 <div class="mm-item-caption"><?php esc_html_e('Markup for each submitted image. You may include any of the following variables:', 'usp'); ?>
572 <code>%%width%%</code>, <code>%%height%%</code>, <code>%%thumb%%</code>, <code>%%medium%%</code>, <code>%%large%%</code>, <code>%%full%%</code>, <code>%%custom%%</code>,
573 <code>%%title%%</code>, <code>%%title_parent%%</code>, <code>%%author%%</code>, <code>%%url%%</code></div></td>
574 </tr>
575 <tr>
576 <th scope="row"><label class="description" for="usp_options[auto_display_email]"><?php esc_html_e('Email Display', 'usp'); ?></label></th>
577 <td>
578 <div class="mm-item-desc"><?php esc_html_e('Display submitted email address:', 'usp'); ?></div>
579 <?php echo usp_auto_display_options('email'); ?>
580 </td>
581 </tr>
582 <tr>
583 <th scope="row"><label class="description" for="usp_options[auto_email_markup]"><?php esc_html_e('Email Markup', 'usp'); ?></label></th>
584 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[auto_email_markup]"><?php if (isset($usp_options['auto_email_markup'])) echo esc_textarea($usp_options['auto_email_markup']); ?></textarea>
585 <div class="mm-item-caption"><?php esc_html_e('Markup for submitted email address. You may include any of the following variables:', 'usp'); ?>
586 <code>%%email%%</code>, <code>%%author%%</code>, <code>%%title%%</code></div></td>
587 </tr>
588 <tr>
589 <th scope="row"><label class="description" for="usp_options[auto_display_name]"><?php esc_html_e('Name Display', 'usp'); ?></label></th>
590 <td>
591 <div class="mm-item-desc"><?php esc_html_e('Display submitted author/name:', 'usp'); ?></div>
592 <?php echo usp_auto_display_options('name'); ?>
593 </td>
594 </tr>
595 <tr>
596 <th scope="row"><label class="description" for="usp_options[auto_name_markup]"><?php esc_html_e('Name Markup', 'usp'); ?></label></th>
597 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[auto_name_markup]"><?php if (isset($usp_options['auto_name_markup'])) echo esc_textarea($usp_options['auto_name_markup']); ?></textarea>
598 <div class="mm-item-caption"><?php esc_html_e('Markup for submitted author/name. You may include', 'usp'); ?>
599 <code>%%author%%</code> <?php esc_html_e('to display the submitted name.', 'usp'); ?></div></td>
600 </tr>
601 <tr>
602 <th scope="row"><label class="description" for="usp_options[auto_display_url]"><?php esc_html_e('URL Display', 'usp'); ?></label></th>
603 <td>
604 <div class="mm-item-desc"><?php esc_html_e('Display submitted URL:', 'usp'); ?></div>
605 <?php echo usp_auto_display_options('url'); ?>
606 </td>
607 </tr>
608 <tr>
609 <th scope="row"><label class="description" for="usp_options[auto_url_markup]"><?php esc_html_e('URL Markup', 'usp'); ?></label></th>
610 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[auto_url_markup]"><?php if (isset($usp_options['auto_url_markup'])) echo esc_textarea($usp_options['auto_url_markup']); ?></textarea>
611 <div class="mm-item-caption"><?php esc_html_e('Markup for submitted URL. You may include any of the following variables:', 'usp'); ?>
612 <code>%%url%%</code>, <code>%%author%%</code>, <code>%%title%%</code></div></td>
613 </tr>
614 <tr>
615 <th scope="row"><label class="description" for="usp_options[auto_display_custom]"><?php esc_html_e('Custom Field 1 Display', 'usp'); ?></label></th>
616 <td>
617 <div class="mm-item-desc"><?php esc_html_e('Display Custom Field 1:', 'usp'); ?></div>
618 <?php echo usp_auto_display_options('custom'); ?>
619 </td>
620 </tr>
621 <tr>
622 <th scope="row"><label class="description" for="usp_options[auto_custom_markup]"><?php esc_html_e('Custom Field 1 Markup', 'usp'); ?></label></th>
623 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[auto_custom_markup]"><?php if (isset($usp_options['auto_custom_markup'])) echo esc_textarea($usp_options['auto_custom_markup']); ?></textarea>
624 <div class="mm-item-caption"><?php esc_html_e('Markup for Custom Field 1. You may include any of the following variables:', 'usp'); ?>
625 <code>%%custom_label%%</code>, <code>%%custom_name%%</code>, <code>%%custom_value%%</code>, <code>%%author%%</code>, <code>%%title%%</code></div></td>
626 </tr>
627 <tr>
628 <th scope="row"><label class="description" for="usp_options[auto_display_custom_2]"><?php esc_html_e('Custom Field 2 Display', 'usp'); ?></label></th>
629 <td>
630 <div class="mm-item-desc"><?php esc_html_e('Display Custom Field 2:', 'usp'); ?></div>
631 <?php echo usp_auto_display_options('custom_2'); ?>
632 </td>
633 </tr>
634 <tr>
635 <th scope="row"><label class="description" for="usp_options[auto_custom_markup_2]"><?php esc_html_e('Custom Field 2 Markup', 'usp'); ?></label></th>
636 <td><textarea class="textarea" rows="3" cols="50" name="usp_options[auto_custom_markup_2]"><?php if (isset($usp_options['auto_custom_markup_2'])) echo esc_textarea($usp_options['auto_custom_markup_2']); ?></textarea>
637 <div class="mm-item-caption"><?php esc_html_e('Markup for Custom Field 2. You may include any of the following variables:', 'usp'); ?>
638 <code>%%custom_label_2%%</code>, <code>%%custom_name_2%%</code>, <code>%%custom_value_2%%</code>, <code>%%author%%</code>, <code>%%title%%</code></div></td>
639 </tr>
640 <tr>
641 <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th>
642 <td>
643 <span class="mm-item-caption">
644 <?php esc_html_e('For more options and features, check out', 'usp'); ?>
645 <strong><a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a></strong>
646 </span>
647 </td>
648 </tr>
649 </table>
650 </div>
651
652 <input type="submit" class="button-primary" value="<?php esc_attr_e('Save All Changes', 'usp'); ?>">
653
654 </div>
655
656 </div>
657
658 <div id="mm-panel-secondary" class="postbox">
659
660 <h2><?php esc_html_e('Display the Form', 'usp'); ?></h2>
661
662 <div class="toggle default-hidden">
663
664 <h3><?php esc_html_e('Display the submit-post form', 'usp'); ?></h3>
665 <div class="shortcode-info">
666 <p><?php esc_html_e('USP enables you to display a post-submission form anywhere on your site.', 'usp'); ?></p>
667 <p><?php esc_html_e('Use the shortcode to display the form on any WP Post or Page:', 'usp'); ?></p>
668 <pre>[user-submitted-posts]</pre>
669 <p><?php esc_html_e('Or, use the template tag to display the form anywhere in your theme template:', 'usp'); ?></p>
670 <pre>&lt;?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?&gt;</pre>
671 <p>
672 <?php esc_html_e('Want more than one form? Create unlimited submission forms, registration forms, contact forms and more with', 'usp'); ?>
673 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?>&nbsp;&raquo;</a>
674 </p>
675 </div>
676
677 <h3><?php esc_html_e('Display the login/register form', 'usp'); ?></h3>
678 <div class="shortcode-info">
679 <p><?php esc_html_e('You also can display a simple form that enables users to log in, register, or reset their password.', 'usp'); ?></p>
680 <p><?php esc_html_e('Use the shortcode to display the form on any WP Post or Page:', 'usp'); ?></p>
681 <pre>[usp-login-form]</pre>
682 <p><?php esc_html_e('Or, use the template tag to display the form anywhere in your theme template:', 'usp'); ?></p>
683 <pre>&lt;?php if (function_exists('usp_login_form')) usp_login_form(); ?&gt;</pre>
684 <p><?php esc_html_e('The login/register form displays as a tabbed interface, so users can switch between login, register, and reset password.', 'usp'); ?></p>
685 </div>
686
687 <h3><?php esc_html_e('Display user-submitted posts', 'usp'); ?></h3>
688 <div class="shortcode-info">
689 <p><?php esc_html_e('Use this shortcode to display a list of submitted posts on any WP Post or Page:', 'usp'); ?></p>
690 <pre>[usp_display_posts]</pre>
691 <p><?php esc_html_e('Or, use the template tag to display a list of submitted posts anywhere in your theme template:', 'usp'); ?></p>
692 <pre>&lt;?php if (function_exists('usp_display_posts')) echo usp_display_posts(array('userid' => 'all', 'numposts' => -1)); ?&gt;</pre>
693 <p><?php esc_html_e('Here are some examples showing how to configure this shortcode:', 'usp'); ?></p>
694 <pre>[usp_display_posts] : default displays all submitted posts by all authors
695 [usp_display_posts userid="1"] : displays all submitted posts by registered user with ID = 1
696 [usp_display_posts userid="Pat Smith"] : displays all submitted posts by author name "Pat Smith"
697 [usp_display_posts userid="all"] : displays all submitted posts by all users/authors
698 [usp_display_posts userid="all" numposts="5"] : limit to 5 posts from all users</pre>
699 <p>
700 <strong><?php esc_html_e('Tip:', 'usp'); ?></strong>
701 <?php esc_html_e('The pro version provides many more options for this shortcode.', 'usp'); ?>
702 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-display-list-submitted-posts/"><?php esc_html_e('Learn&nbsp;more', 'usp'); ?>&nbsp;&raquo;</a>
703 </p>
704 </div>
705
706 <h3><?php esc_html_e('Display image gallery', 'usp'); ?></h3>
707 <div class="shortcode-info">
708 <p><?php esc_html_e('Use this shortcode to display a gallery of uploaded images for each submitted post:', 'usp'); ?></p>
709 <pre>[usp_gallery]</pre>
710 <p><?php esc_html_e('Or, use the template tag to display an image gallery anywhere in your theme template:', 'usp'); ?></p>
711 <pre>&lt;?php if (function_exists('usp_get_images')) $images = usp_get_images(); foreach ($images as $image) echo $image; ?&gt;</pre>
712 <p><?php esc_html_e('You can customize using any of the follwing attributes:', 'usp'); ?></p>
713 <pre>$size = image size as thumbnail, medium, large or full -> default = thumbnail
714 $before = text/markup displayed before the image URL -> default = {a href='%%url%%'}{img src='
715 $after = text/markup displayed after the image URL -> default = ' /}{/a}
716 $number = the number of images to display for each post -> default = false (display all)
717 $postId = an optional post ID to use -> default = false (uses global/current post)</pre>
718 <p><strong><?php esc_html_e('Notes:', 'usp'); ?></strong></p>
719 <ul>
720 <li>
721 <?php esc_html_e('Use curly brackets', 'usp'); ?> <code>{</code> <code>}</code> <?php esc_html_e('to output angle brackets', 'usp'); ?>
722 <code>&lt;</code> <code>&gt;</code> <?php esc_html_e('in', 'usp'); ?> <code>before</code> <?php esc_html_e('and', 'usp'); ?>
723 <code>after</code> <?php esc_html_e('attributes', 'usp'); ?>
724 </li>
725 <li>
726 <?php esc_html_e('Use single straight quotes (instead of double quotes) in', 'usp'); ?>
727 <code>before</code> <?php esc_html_e('and', 'usp'); ?> <code>after</code> <?php esc_html_e('attributes', 'usp'); ?>
728 </li>
729 <li><?php esc_html_e('Can use', 'usp'); ?> <code>%%url%%</code> <?php esc_html_e('to get the URL of the full-size image', 'usp'); ?></li>
730 <li><?php esc_html_e('Check out the source code inline notes for more info', 'usp'); ?></li>
731 </ul>
732 </div>
733
734 <h3><?php esc_html_e('Reset Form Button', 'usp'); ?></h3>
735 <div class="shortcode-info">
736 <p><?php esc_html_e('This shortcode displays a link that resets the form to its original state:', 'usp'); ?></p>
737 <pre>[usp-reset-button]</pre>
738 <p><?php esc_html_e('This shortcode accepts the following attributes:', 'usp'); ?></p>
739 <pre>class = classes for the parent element (optional, default: none)
740 value = link text (optional, default: "Reset form")
741 url = the URL where your form is displayed (required, default: none)
742 custom = any attributes or custom code for the link element (optional, default: none)</pre>
743 <p><?php esc_html_e('Note that the url attribute accepts', 'usp'); ?> <code>%%current%%</code> <?php esc_html_e('to get the current URL.', 'usp'); ?></p>
744 </div>
745
746 <h3><?php esc_html_e('Access Control', 'usp'); ?></h3>
747 <div class="shortcode-info">
748 <p><?php esc_html_e('USP provides three shortcodes to control access and restrict content.', 'usp'); ?></p>
749 <p><?php esc_html_e('Display content only to users with a specific capability:', 'usp'); ?></p>
750 <pre>[usp_access cap="read" deny="Message for users without read capability"][/usp_access]</pre>
751 <p><?php esc_html_e('Display content to logged-in users:', 'usp'); ?></p>
752 <pre>[usp_member deny="Message for users who are not logged in"][/usp_member]</pre>
753 <p><?php esc_html_e('Display content to visitors only:', 'usp'); ?></p>
754 <pre>[usp_visitor deny="Message for users who are logged in"][/usp_visitor]</pre>
755 <p>
756 <strong><?php esc_html_e('Tip:', 'usp'); ?></strong>
757 <?php esc_html_e('to include markup in the deny message, you can use', 'usp'); ?> <code>{tag}</code> <?php esc_html_e('to output', 'usp'); ?> <code>&lt;tag&gt;</code>.
758 </p>
759 <p><strong><?php esc_html_e('Example', 'usp'); ?></strong></p>
760 <p><?php esc_html_e('If the user is logged in, display the post-submit form; or if the user is not logged in, display the login form:', 'usp'); ?></p>
761 <pre>[usp_member]
762 [user-submitted-posts]
763 [/usp_member]
764
765 [usp_visitor]
766 [usp-login-form]
767 [/usp_visitor]</pre>
768 <p>
769 <?php esc_html_e('The access shortcodes can be added to any WP Post or Page. So you can display forms and other content conditionally, based on user role and login status.', 'usp'); ?>
770 </p>
771 <p class="no-bottom-margin">
772 <strong><?php esc_html_e('Tip:', 'usp'); ?></strong>
773 <?php esc_html_e('The pro version provides more flexibility with access-control shortcodes.', 'usp'); ?>
774 <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-nested-shortcodes/"><?php esc_html_e('Learn&nbsp;more', 'usp'); ?>&nbsp;&raquo;</a>
775 </p>
776 </div>
777
778 </div>
779
780 </div>
781
782 <div id="mm-restore-settings" class="postbox">
783 <h2><?php esc_html_e('Restore Defaults', 'usp'); ?></h2>
784 <div class="toggle default-hidden">
785 <p class="first-child"><?php esc_html_e('Leave this option disabled to remember your settings.', 'usp'); ?></p>
786 <p><?php esc_html_e('Or, to go ahead and restore the default plugin options: check the box, save your settings, and then deactivate/reactivate the plugin.', 'usp'); ?></p>
787 <p>
788 <input name="usp_options[default_options]" type="checkbox" value="1" id="mm_restore_defaults" <?php if (isset($usp_options['default_options'])) checked('1', $usp_options['default_options']); ?> />
789 <label class="description" for="usp_options[default_options]"><?php esc_html_e('Restore default options upon plugin deactivation/reactivation', 'usp'); ?></label>
790 </p>
791 <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'usp'); ?>" />
792 </div>
793 </div>
794
795 <div id="mm-panel-current" class="postbox">
796 <h2><?php esc_html_e('WP Resources', 'usp'); ?></h2>
797 <div class="toggle<?php if (isset($_GET['settings-updated'])) echo ' default-hidden'; ?>">
798 <?php require_once('support-panel.php'); user_submitted_posts_wp_resources(); ?>
799 </div>
800 </div>
801 </div>
802 </div>
803
804 <div id="mm-credit-info">
805 <a target="_blank" rel="noopener noreferrer" href="https://perishablepress.com/user-submitted-posts/" title="<?php esc_attr_e('Plugin Homepage', 'usp'); ?>"><?php echo USP_PLUGIN; ?></a> <?php esc_html_e('by', 'usp'); ?>
806 <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/perishable" title="<?php esc_attr_e('Jeff Starr on Twitter', 'usp'); ?>">Jeff Starr</a> @
807 <a target="_blank" rel="noopener noreferrer" href="https://monzillamedia.com/" title="<?php esc_attr_e('Obsessive Web Design &amp; Development', 'usp'); ?>">Monzilla Media</a>
808 </div>
809 </form>
810 </div>
811
812 <script type="text/javascript">
813 jQuery(document).ready(function($){
814
815 // dismiss alert
816 if (!$('.dismiss-alert-wrap input').is(':checked')){
817 $('.dismiss-alert-wrap input').one('click', function(){
818 $('.dismiss-alert-wrap').after('<input type="submit" class="button-secondary" value="<?php esc_attr_e('Save Preference', 'usp'); ?>" />');
819 });
820 }
821
822 });
823 </script>
824
825 <?php
826
827 }