PluginProbe
User Submitted Posts – Enable Users to Submit Posts from the Front End / 20231102
User Submitted Posts – Enable Users to Submit Posts from the Front End v20231102
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 / support-panel.php

support-panel.php in User Submitted Posts – Enable Users to Submit Posts from the Front End 20231102, at library/support-panel.php

113 lines 6.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // User Submitted Posts - Show Support Panel
2
3 if (!function_exists('add_action')) die();
4
5 function user_submitted_posts_wp_resources() {
6
7 $plugin_project = esc_html__('User Submitted Posts', 'usp');
8
9 $plugin_url = USP_URL;
10
11 $array = array(
12
13 0 => '<a target="_blank" rel="noopener noreferrer" href="https://digwp.com/" title="Take your WP skills to the next level"><img width="125" height="125" src="'. $plugin_url .'images/250x250-digging-into-wordpress.jpg" alt="Digging Into WordPress"></a>',
14
15 1 => '<a target="_blank" rel="noopener noreferrer" href="https://htaccessbook.com/" title="Secure and optimize your website"><img width="125" height="125" src="'. $plugin_url .'images/250x250-htaccess-made-easy.jpg" alt=".htaccess made easy"></a>',
16
17 2 => '<a target="_blank" rel="noopener noreferrer" href="https://wp-tao.com/" title="Learn the Way of WordPress"><img width="125" height="125" src="'. $plugin_url .'images/250x250-tao-of-wordpress.jpg" alt="The Tao of WordPress"></a>',
18
19 3 => '<a target="_blank" rel="noopener noreferrer" href="https://books.perishablepress.com/downloads/wizards-collection-sql-recipes-wordpress/" title="Wizard&rsquo;s SQL Recipes for WordPress"><img width="125" height="125" src="'. $plugin_url .'images/250x250-wizards-sql.jpg" alt="Wizard&rsquo;s SQL Recipes for WordPress"></a>',
20
21 4 => '<a target="_blank" rel="noopener noreferrer" href="https://wp-tao.com/wordpress-themes-book/" title="Build and sell awesome themes"><img width="125" height="125" src="'. $plugin_url .'images/250x250-wp-themes-in-depth.jpg" alt="WordPress Themes In Depth"></a>',
22
23 //
24
25 5 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/banhammer-pro/" title="Banhammer Pro: Drop the hammer."><img width="125" height="125" src="'. $plugin_url .'images/250x250-banhammer-pro.jpg" alt="Banhammer Pro"></a>',
26
27 6 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/bbq-pro/" title="Fastest WordPress Firewall"><img width="125" height="125" src="'. $plugin_url .'images/250x250-bbq-pro.jpg" alt="BBQ Pro Firewall"></a>',
28
29 7 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/blackhole-pro/" title="Trap bad bots in a virtual black hole"><img width="125" height="125" src="'. $plugin_url .'images/250x250-blackhole-pro.jpg" alt="Blackhole Pro"></a>',
30
31 8 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/ga-google-analytics-pro/" title="Connect Google Analytics to WordPress"><img width="125" height="125" src="'. $plugin_url .'images/250x250-ga-pro.jpg" alt="GA Google Analytics Pro"></a>',
32
33 9 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/simple-ajax-chat-pro/" title="Unlimited chats for WordPress"><img width="125" height="125" src="'. $plugin_url .'images/250x250-sac-pro.jpg" alt="Simple Ajax Chat Pro"></a>',
34
35 10 => '<a target="_blank" rel="noopener noreferrer" href="https://plugin-planet.com/usp-pro/" title="Unlimited front-end forms"><img width="125" height="125" src="'. $plugin_url .'images/250x250-usp-pro.jpg" alt="USP Pro"></a>',
36
37 );
38
39 $items = array_rand($array, 3);
40
41 $item1 = isset($array[$items[0]]) ? $array[$items[0]] : 0;
42 $item2 = isset($array[$items[1]]) ? $array[$items[1]] : 1;
43 $item3 = isset($array[$items[2]]) ? $array[$items[2]] : 2;
44
45 $url1 = esc_url('https://books.perishablepress.com/');
46 $url2 = esc_url('https://plugin-planet.com/store/');
47 $url3 = esc_url('https://monzillamedia.com/donate.html');
48
49 $title1 = esc_html__('Perishable Press Books', 'usp');
50 $title2 = esc_html__('Plugin Planet: Pro WordPress Plugins', 'usp');
51 $title3 = esc_html__('Donate via PayPal, credit card, or cryptocurrency', 'usp');
52
53 $link1 = ' <a target="_blank" rel="noopener noreferrer" href="'. $url1 .'" title="'. $title1 .'">'. esc_html__('books', 'usp') .'</a> ';
54 $link2 = ' <a target="_blank" rel="noopener noreferrer" href="'. $url2 .'" title="'. $title2 .'">'. esc_html__('plugins', 'usp') .'</a>, ';
55 $link3 = ' <a target="_blank" rel="noopener noreferrer" href="'. $url3 .'" title="'. $title3 .'">'. esc_html__('donation', 'usp') .'</a>. ';
56
57 $message = esc_html__('Thank you for using', 'usp') .' '. $plugin_project .'! ';
58 $message .= esc_html__('Please show support by purchasing one of my', 'usp') . $link1;
59 $message .= esc_html__('or', 'usp') . $link2 . esc_html__('or by making a', 'usp') . $link3;
60 $message .= esc_html__('Your generous support helps future development of', 'usp') .' '. $plugin_project .' ';
61 $message .= esc_html__('and is greatly appreciated.', 'usp');
62
63 $donate = esc_html__('Any size donation helps me to continue developing this free plugin and other awesome WordPress resources.', 'usp');
64
65 ?>
66
67 <style type="text/css">
68 #project-wrap { width: 100%; overflow: hidden; }
69 #project-wrap p { font-size: 12px; }
70 #project-wrap .project-support { float: left; max-width: 480px; }
71 #project-wrap .project-message p { margin: 5px 15px 15px 15px; }
72
73 #project-wrap .project-links { width: 100%; overflow: hidden; margin: 15px 0; }
74 #project-wrap .project-links img { display: block; width: 125px; height: 125px; margin: 0; padding: 0; border: 0; background-color: #fff; color: #fff; }
75 #project-wrap .project-links a { float: left; width: 125px; height: 125px; margin: 0 0 0 15px; padding: 1px; border: 1px solid #ccc; opacity: 0.9; }
76 #project-wrap .project-links a:hover { opacity: 1.0; }
77
78 #project-wrap .project-blurb {
79 float: left; width: 220px; box-sizing: border-box; margin: 5px 0 25px 20px; padding: 15px 20px; border-radius: 5px;
80 background-color: #fefefe; border: 1px solid #ccc; box-shadow: 0 20px 25px -20px rgba(0,0,0,0.5);
81 }
82 #project-wrap .project-blurb p { margin: 0 0 10px 0; }
83 #project-wrap .project-blurb p:first-child { font-size: 13px; }
84 #project-wrap .project-blurb p:last-child { margin: 0 0 5px 0; }
85
86 @media (max-width: 880px) {
87 #project-wrap .project-support { max-width: 100%; }
88 #project-wrap .project-message p { font-size: 13px; }
89 #project-wrap .project-blurb { display: none; }
90 }
91 @media (max-width: 550px) {
92 #mm-panel-current { display: none; }
93 }
94 </style>
95 <div id="project-wrap">
96 <div class="project-support">
97 <div class="project-message">
98 <p><?php echo $message; ?></p>
99 </div>
100 <div class="project-links">
101 <?php echo $item1 . $item2 . $item3; ?>
102 </div>
103 </div>
104 <div class="project-blurb">
105 <p><strong><?php esc_html_e('Please Donate', 'usp'); ?></strong></p>
106 <p><?php echo $donate; ?></p>
107 <p><a target="_blank" rel="noopener noreferrer" href="<?php echo $url3; ?>" title="<?php echo $title3; ?>"><?php esc_html_e('Make a donation&nbsp;&raquo;', 'usp'); ?></a></p>
108 </div>
109 </div>
110
111 <?php
112
113 }