| @@ -97,8 +97,9 @@ | ||
| 97 | 97 | echo usp_form_field_options_custom('1'); |
| 98 | 98 | echo usp_form_field_options_custom('2'); |
| 99 | 99 | echo usp_form_field_options_captcha(); |
| 100 | 100 | echo usp_form_field_options_recaptcha(); |
| 101 | + echo usp_form_field_options_turnstile(); | |
| 101 | 102 | echo usp_form_field_options_images(); |
| 102 | 103 | |
| 103 | 104 | ?> |
| 104 | 105 | <tr> |
| @@ -299,9 +300,9 @@ | ||
| 299 | 300 | <tr> |
| 300 | 301 | <th scope="row"><label class="description" for="usp_options[email_alert_subject]"><?php esc_html_e('Email Alert Subject', 'usp'); ?></label></th> |
| 301 | 302 | <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']); ?>" /> |
| 302 | 303 | <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'); ?> |
| 303 | - <code>%%post_title%%</code>, <code>%%post_content%%</code>, <code>%%post_author%%</code>, <code>%%post_date%%</code>, <code>%%blog_name%%</code>, <code>%%blog_url%%</code>, <code>%%post_url%%</code>, <code>%%admin_url%%</code>, | |
| 304 | + <code>%%post_title%%</code>, <code>%%post_content%%</code>, <code>%%post_cats%%</code>, <code>%%post_author%%</code>, <code>%%post_date%%</code>, <code>%%blog_name%%</code>, <code>%%blog_url%%</code>, <code>%%post_url%%</code>, <code>%%admin_url%%</code>, | |
| 304 | 305 | <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> |
| 305 | 306 | </tr> |
| 306 | 307 | <tr> |
| 307 | 308 | <th scope="row"><label class="description" for="usp_options[email_alert_message]"><?php esc_html_e('Email Alert Message', 'usp'); ?></label></th> |
| @@ -306,9 +307,9 @@ | ||
| 306 | 307 | <tr> |
| 307 | 308 | <th scope="row"><label class="description" for="usp_options[email_alert_message]"><?php esc_html_e('Email Alert Message', 'usp'); ?></label></th> |
| 308 | 309 | <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> |
| 309 | 310 | <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'); ?> |
| 310 | - <code>%%post_title%%</code>, <code>%%post_content%%</code>, <code>%%post_author%%</code>, <code>%%post_date%%</code>, <code>%%blog_name%%</code>, <code>%%blog_url%%</code>, <code>%%post_url%%</code>, <code>%%admin_url%%</code>, | |
| 311 | + <code>%%post_title%%</code>, <code>%%post_content%%</code>, <code>%%post_cats%%</code>, <code>%%post_author%%</code>, <code>%%post_date%%</code>, <code>%%blog_name%%</code>, <code>%%blog_url%%</code>, <code>%%post_url%%</code>, <code>%%admin_url%%</code>, | |
| 311 | 312 | <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> |
| 312 | 313 | </tr> |
| 313 | 314 | <tr> |
| 314 | 315 | <th scope="row"><label class="description"><?php esc_html_e('More Options', 'usp'); ?></label></th> |
| @@ -491,9 +492,9 @@ | ||
| 491 | 492 | </div> |
| 492 | 493 | |
| 493 | 494 | <h3 id="usp-recaptcha"><?php esc_html_e('Google reCaptcha', 'usp'); ?></h3> |
| 494 | 495 | <div class="mm-table-wrap"> |
| 495 | - <div class="mm-section-desc"><?php esc_html_e('To enable Google reCaptcha, enter your public and private keys.', 'usp'); ?></div> | |
| 496 | + <div class="mm-section-desc"><?php esc_html_e('To enable Google reCaptcha, enter your public and private keys.', 'usp'); ?> <strong><?php esc_html_e('Important:', 'usp'); ?></strong> <?php esc_html_e('do NOT use both Google and Cloudflare captchas at the same time.', 'usp'); ?></div> | |
| 496 | 497 | <table class="widefat mm-table"> |
| 497 | 498 | <tr> |
| 498 | 499 | <th scope="row"><label class="description" for="usp_options[recaptcha_public]"><?php esc_html_e('Public Key', 'usp'); ?></label></th> |
| 499 | 500 | <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']); ?>" /> |
| @@ -513,8 +514,25 @@ | ||
| 513 | 514 | </tr> |
| 514 | 515 | </table> |
| 515 | 516 | </div> |
| 516 | 517 | |
| 518 | + <h3 id="usp-turnstile"><?php esc_html_e('Cloudflare Turnstile', 'usp'); ?></h3> | |
| 519 | + <div class="mm-table-wrap"> | |
| 520 | + <div class="mm-section-desc"><?php esc_html_e('To enable Cloudflare Turnstile, enter your site key and secret key.', 'usp'); ?> <strong><?php esc_html_e('Important:', 'usp'); ?></strong> <?php esc_html_e('do NOT use both Google and Cloudflare captchas at the same time.', 'usp'); ?></div> | |
| 521 | + <table class="widefat mm-table"> | |
| 522 | + <tr> | |
| 523 | + <th scope="row"><label class="description" for="usp_options[turnstile_site_key]"><?php esc_html_e('Site Key', 'usp'); ?></label></th> | |
| 524 | + <td><input type="text" size="45" name="usp_options[turnstile_site_key]" value="<?php if (isset($usp_options['turnstile_site_key'])) echo esc_attr($usp_options['turnstile_site_key']); ?>" /> | |
| 525 | + <div class="mm-item-caption"><?php esc_html_e('Enter your Site Key', 'usp'); ?></div></td> | |
| 526 | + </tr> | |
| 527 | + <tr> | |
| 528 | + <th scope="row"><label class="description" for="usp_options[turnstile_secret_key]"><?php esc_html_e('Secret Key', 'usp'); ?></label></th> | |
| 529 | + <td><input type="text" size="45" name="usp_options[turnstile_secret_key]" value="<?php if (isset($usp_options['turnstile_secret_key'])) echo esc_attr($usp_options['turnstile_secret_key']); ?>" /> | |
| 530 | + <div class="mm-item-caption"><?php esc_html_e('Enter your Secret Key', 'usp'); ?></div></td> | |
| 531 | + </tr> | |
| 532 | + </table> | |
| 533 | + </div> | |
| 534 | + | |
| 517 | 535 | <h3 id="usp-image-uploads"><?php esc_html_e('Image Uploads', 'usp'); ?></h3> |
| 518 | 536 | <div class="mm-table-wrap"> |
| 519 | 537 | <div class="mm-section-desc"><?php esc_html_e('Configure settings for image uploads.', 'usp'); ?></div> |
| 520 | 538 | <table class="widefat mm-table"> |
| @@ -693,11 +711,11 @@ | ||
| 693 | 711 | <h3><?php esc_html_e('Display the submit-post form', 'usp'); ?></h3> |
| 694 | 712 | <div class="shortcode-info"> |
| 695 | 713 | <p><?php esc_html_e('USP enables you to display a post-submission form anywhere on your site.', 'usp'); ?></p> |
| 696 | 714 | <p><?php esc_html_e('Use the shortcode to display the form on any WP Post or Page:', 'usp'); ?></p> |
| 697 | - <pre>[user-submitted-posts]</pre> | |
| 715 | + <div class="mm-pre">[user-submitted-posts]</div> | |
| 698 | 716 | <p><?php esc_html_e('Or, use the template tag to display the form anywhere in your theme template:', 'usp'); ?></p> |
| 699 | - <pre><?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?></pre> | |
| 717 | + <div class="mm-pre"><?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?></div> | |
| 700 | 718 | <p> |
| 701 | 719 | <?php esc_html_e('Want more than one form? Create unlimited submission forms, registration forms, contact forms and more with', 'usp'); ?> |
| 702 | 720 | <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/"><?php esc_html_e('USP Pro', 'usp'); ?> »</a> |
| 703 | 721 | </p> |
| @@ -706,11 +724,11 @@ | ||
| 706 | 724 | <h3><?php esc_html_e('Display the login/register form', 'usp'); ?></h3> |
| 707 | 725 | <div class="shortcode-info"> |
| 708 | 726 | <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> |
| 709 | 727 | <p><?php esc_html_e('Use the shortcode to display the form on any WP Post or Page:', 'usp'); ?></p> |
| 710 | - <pre>[usp-login-form]</pre> | |
| 728 | + <div class="mm-pre">[usp-login-form]</div> | |
| 711 | 729 | <p><?php esc_html_e('Or, use the template tag to display the form anywhere in your theme template:', 'usp'); ?></p> |
| 712 | - <pre><?php if (function_exists('usp_login_form')) usp_login_form(); ?></pre> | |
| 730 | + <div class="mm-pre"><?php if (function_exists('usp_login_form')) usp_login_form(); ?></div> | |
| 713 | 731 | <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> |
| 714 | 732 | </div> |
| 715 | 733 | |
| 716 | 734 | <h3><?php esc_html_e('Display user-submitted posts', 'usp'); ?></h3> |
| @@ -715,17 +733,17 @@ | ||
| 715 | 733 | |
| 716 | 734 | <h3><?php esc_html_e('Display user-submitted posts', 'usp'); ?></h3> |
| 717 | 735 | <div class="shortcode-info"> |
| 718 | 736 | <p><?php esc_html_e('Use this shortcode to display a list of submitted posts on any WP Post or Page:', 'usp'); ?></p> |
| 719 | - <pre>[usp_display_posts]</pre> | |
| 737 | + <div class="mm-pre">[usp_display_posts]</div> | |
| 720 | 738 | <p><?php esc_html_e('Or, use the template tag to display a list of submitted posts anywhere in your theme template:', 'usp'); ?></p> |
| 721 | - <pre><?php if (function_exists('usp_display_posts')) echo usp_display_posts(array('userid' => 'all', 'numposts' => -1)); ?></pre> | |
| 739 | + <div class="mm-pre"><?php if (function_exists('usp_display_posts')) echo usp_display_posts(array('userid' => 'all', 'numposts' => -1)); ?></div> | |
| 722 | 740 | <p><?php esc_html_e('Here are some examples showing how to configure this shortcode:', 'usp'); ?></p> |
| 723 | -<pre>[usp_display_posts] : default displays all submitted posts by all authors | |
| 741 | +<div class="mm-pre">[usp_display_posts] : default displays all submitted posts by all authors | |
| 724 | 742 | [usp_display_posts userid="1"] : displays all submitted posts by registered user with ID = 1 |
| 725 | 743 | [usp_display_posts userid="Pat Smith"] : displays all submitted posts by author name "Pat Smith" |
| 726 | 744 | [usp_display_posts userid="all"] : displays all submitted posts by all users/authors |
| 727 | -[usp_display_posts userid="all" numposts="5"] : limit to 5 posts from all users</pre> | |
| 745 | +[usp_display_posts userid="all" numposts="5"] : limit to 5 posts from all users</div> | |
| 728 | 746 | <p> |
| 729 | 747 | <strong><?php esc_html_e('Tip:', 'usp'); ?></strong> |
| 730 | 748 | <?php esc_html_e('The pro version provides many more options for this shortcode.', 'usp'); ?> |
| 731 | 749 | <a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro-display-list-submitted-posts/"><?php esc_html_e('Learn more', 'usp'); ?> »</a> |
| @@ -734,17 +752,17 @@ | ||
| 734 | 752 | |
| 735 | 753 | <h3><?php esc_html_e('Display image gallery', 'usp'); ?></h3> |
| 736 | 754 | <div class="shortcode-info"> |
| 737 | 755 | <p><?php esc_html_e('Use this shortcode to display a gallery of uploaded images for each submitted post:', 'usp'); ?></p> |
| 738 | - <pre>[usp_gallery]</pre> | |
| 756 | + <div class="mm-pre">[usp_gallery]</div> | |
| 739 | 757 | <p><?php esc_html_e('Or, use the template tag to display an image gallery anywhere in your theme template:', 'usp'); ?></p> |
| 740 | - <pre><?php if (function_exists('usp_get_images')) $images = usp_get_images(); foreach ($images as $image) echo $image; ?></pre> | |
| 758 | + <div class="mm-pre"><?php if (function_exists('usp_get_images')) $images = usp_get_images(); foreach ($images as $image) echo $image; ?></div> | |
| 741 | 759 | <p><?php esc_html_e('You can customize using any of the follwing attributes:', 'usp'); ?></p> |
| 742 | -<pre>$size = image size as thumbnail, medium, large or full -> default = thumbnail | |
| 760 | +<div class="mm-pre">$size = image size as thumbnail, medium, large or full -> default = thumbnail | |
| 743 | 761 | $before = text/markup displayed before the image URL -> default = {a href='%%url%%'}{img src=' |
| 744 | 762 | $after = text/markup displayed after the image URL -> default = ' /}{/a} |
| 745 | 763 | $number = the number of images to display for each post -> default = false (display all) |
| 746 | -$postId = an optional post ID to use -> default = false (uses global/current post)</pre> | |
| 764 | +$postId = an optional post ID to use -> default = false (uses global/current post)</div> | |
| 747 | 765 | <p><strong><?php esc_html_e('Notes:', 'usp'); ?></strong></p> |
| 748 | 766 | <ul> |
| 749 | 767 | <li> |
| 750 | 768 | <?php esc_html_e('Use curly brackets', 'usp'); ?> <code>{</code> <code>}</code> <?php esc_html_e('to output angle brackets', 'usp'); ?> |
| @@ -762,13 +780,13 @@ | ||
| 762 | 780 | |
| 763 | 781 | <h3><?php esc_html_e('Reset Form Button', 'usp'); ?></h3> |
| 764 | 782 | <div class="shortcode-info"> |
| 765 | 783 | <p><?php esc_html_e('This shortcode displays a link that resets the form to its original state:', 'usp'); ?></p> |
| 766 | - <pre>[usp-reset-button]</pre> | |
| 784 | + <div class="mm-pre">[usp-reset-button]</div> | |
| 767 | 785 | <p><?php esc_html_e('This shortcode accepts the following attributes:', 'usp'); ?></p> |
| 768 | -<pre>class = classes for the parent element (optional, default: none) | |
| 786 | +<div class="mm-pre">class = classes for the parent element (optional, default: none) | |
| 769 | 787 | value = link text (optional, default: "Reset form") |
| 770 | -url = the URL where your form is displayed (required, default: none)</pre> | |
| 788 | +url = the URL where your form is displayed (required, default: none)</div> | |
| 771 | 789 | <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> |
| 772 | 790 | </div> |
| 773 | 791 | |
| 774 | 792 | <h3><?php esc_html_e('Access Control', 'usp'); ?></h3> |
| @@ -774,13 +792,13 @@ | ||
| 774 | 792 | <h3><?php esc_html_e('Access Control', 'usp'); ?></h3> |
| 775 | 793 | <div class="shortcode-info"> |
| 776 | 794 | <p><?php esc_html_e('USP provides three shortcodes to control access and restrict content.', 'usp'); ?></p> |
| 777 | 795 | <p><?php esc_html_e('Display content only to users with a specific capability:', 'usp'); ?></p> |
| 778 | - <pre>[usp_access cap="read" deny="Message for users without read capability"][/usp_access]</pre> | |
| 796 | + <div class="mm-pre">[usp_access cap="read" deny="Message for users without read capability"][/usp_access]</div> | |
| 779 | 797 | <p><?php esc_html_e('Display content to logged-in users:', 'usp'); ?></p> |
| 780 | - <pre>[usp_member deny="Message for users who are not logged in"][/usp_member]</pre> | |
| 798 | + <div class="mm-pre">[usp_member deny="Message for users who are not logged in"][/usp_member]</div> | |
| 781 | 799 | <p><?php esc_html_e('Display content to visitors only:', 'usp'); ?></p> |
| 782 | - <pre>[usp_visitor deny="Message for users who are logged in"][/usp_visitor]</pre> | |
| 800 | + <div class="mm-pre">[usp_visitor deny="Message for users who are logged in"][/usp_visitor]</div> | |
| 783 | 801 | <p> |
| 784 | 802 | <strong><?php esc_html_e('Tip:', 'usp'); ?></strong> |
| 785 | 803 | <?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><tag></code>. |
| 786 | 804 | </p> |
| @@ -785,15 +803,15 @@ | ||
| 785 | 803 | <?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><tag></code>. |
| 786 | 804 | </p> |
| 787 | 805 | <p><strong><?php esc_html_e('Example', 'usp'); ?></strong></p> |
| 788 | 806 | <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> |
| 789 | -<pre>[usp_member] | |
| 807 | +<div class="mm-pre">[usp_member] | |
| 790 | 808 | [user-submitted-posts] |
| 791 | 809 | [/usp_member] |
| 792 | 810 | |
| 793 | 811 | [usp_visitor] |
| 794 | 812 | [usp-login-form] |
| 795 | -[/usp_visitor]</pre> | |
| 813 | +[/usp_visitor]</div> | |
| 796 | 814 | <p> |
| 797 | 815 | <?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'); ?> |
| 798 | 816 | </p> |
| 799 | 817 | <p class="no-bottom-margin"> |
| @@ -830,9 +848,9 @@ | ||
| 830 | 848 | </div> |
| 831 | 849 | |
| 832 | 850 | <div id="mm-credit-info"> |
| 833 | 851 | <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'); ?> |
| 834 | - <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/perishable" title="<?php esc_attr_e('Jeff Starr on Twitter', 'usp'); ?>">Jeff Starr</a> @ | |
| 852 | + <a target="_blank" rel="noopener noreferrer" href="https://x.com/perishable" title="<?php esc_attr_e('Jeff Starr on X (Twitter)', 'usp'); ?>">Jeff Starr</a> @ | |
| 835 | 853 | <a target="_blank" rel="noopener noreferrer" href="https://monzillamedia.com/" title="<?php esc_attr_e('Obsessive Web Design & Development', 'usp'); ?>">Monzilla Media</a> |
| 836 | 854 | </div> |
| 837 | 855 | </form> |
| 838 | 856 | </div> |