PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / 2.7.3
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager v2.7.3
3.1.9 3.1.8 3.1.7 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 trunk 1.3.7 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9 2.9.1 2.9.2
folders / includes / class-review-box.php
folders / includes Last commit date
class-affiliate.php 5 years ago class-polylang.php 5 years ago class-review-box.php 5 years ago class-wpml.php 5 years ago folders.class.php 4 years ago form.class.php 5 years ago media.replace.php 4 years ago plugin.updates.php 5 years ago plugins.class.php 5 years ago tree.class.php 5 years ago
class-review-box.php
285 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit;
3 /* Free/Pro Class name change */
4 class folders_review_box {
5
6 public $plugin_name = "Folders";
7
8 public $plugin_slug = "folders";
9
10 public function __construct() {
11
12 add_action("wp_ajax_".$this->plugin_slug."_review_box", array($this, "review_box"));
13
14 add_action('admin_notices', array($this, 'admin_notices'));
15 }
16
17 public function review_box() {
18 if (current_user_can('manage_options')) {
19 $nonce = filter_input(INPUT_POST, 'nonce', FILTER_SANITIZE_STRING);
20 $days = filter_input(INPUT_POST, 'days', FILTER_SANITIZE_STRING);
21 if (!empty($nonce) && wp_verify_nonce($nonce, $this->plugin_slug . "_review_box")) {
22 if ($days == -1) {
23 add_option($this->plugin_slug . "_hide_review_box", "1");
24 } else {
25 $date = date("Y-m-d", strtotime("+" . $days . " days"));
26 update_option($this->plugin_slug . "_show_review_box_after", $date);
27 }
28 }
29 die;
30 }
31 }
32
33 public function admin_notices() {
34 if (current_user_can('manage_options')) {
35 $is_hidden = get_option($this->plugin_slug."_hide_review_box");
36 if($is_hidden !== false) {
37 return;
38 }
39 $current_count = get_option($this->plugin_slug."_show_review_box_after");
40 if($current_count === false) {
41 $date = date("Y-m-d", strtotime("+7 days"));
42 add_option($this->plugin_slug."_show_review_box_after", $date);
43 return;
44 } else if($current_count < 35) {
45 return;
46 }
47 $date_to_show = get_option($this->plugin_slug."_show_review_box_after");
48 if($date_to_show !== false) {
49 $current_date = date("Y-m-d");
50 if($current_date < $date_to_show) {
51 return;
52 }
53 }
54 ?>
55 <style>
56 .<?php echo $this->plugin_slug ?>-premio-review-box p a {
57 display: inline-block;
58 float: right;
59 text-decoration: none;
60 color: #999999;
61 position: absolute;
62 right: 12px;
63 top: 12px;
64 }
65 .<?php echo $this->plugin_slug ?>-premio-review-box p a:hover, .<?php echo $this->plugin_slug ?>-premio-review-box p a:focus {
66 color: #333333;
67 }
68 .<?php echo $this->plugin_slug ?>-premio-review-box .button span {
69 display: inline-block;
70 line-height: 27px;
71 font-size: 16px;
72 }
73 .<?php echo $this->plugin_slug ?>-review-box-popup {
74 position: fixed;
75 width: 100%;
76 height: 100%;
77 z-index: 10001;
78 background: rgba(0,0,0,0.65);
79 top: 0;
80 left: 0;
81 display: none;
82 }
83 .<?php echo $this->plugin_slug ?>-review-box-popup-content {
84 background: #ffffff;
85 padding: 20px;
86 position: absolute;
87 max-width: 450px;
88 width: 100%;
89 margin: 0 auto;
90 top: 45%;
91 left: 0;
92 right: 0;
93 -webkit-border-radius: 5px;
94 -moz-border-radius: 5px;
95 border-radius: 5px;: ;
96 }
97 .<?php echo $this->plugin_slug ?>-review-box-title {
98 padding: 0 0 10px 0;
99 font-weight: bold;
100 }
101 .<?php echo $this->plugin_slug ?>-review-box-options a {
102 display: block;
103 margin: 5px 0 5px 0;
104 color: #333;
105 text-decoration: none;
106 }
107 .<?php echo $this->plugin_slug ?>-review-box-options a.dismiss {
108 color: #999;
109 }
110 .<?php echo $this->plugin_slug ?>-review-box-options a:hover, .affiliate-options a:focus {
111 color: #0073aa;
112 }
113 button.<?php echo $this->plugin_slug ?>-close-review-box-popup {
114 position: absolute;
115 top: 5px;
116 right: 0;
117 border: none;
118 background: transparent;
119 cursor: pointer;
120 }
121 a.button.button-primary.<?php echo $this->plugin_slug ?>-review-box-btn {
122 font-size: 14px;
123 background: #F51366;
124 color: #fff;
125 border: solid 1px #F51366;
126 border-radius: 3px;
127 line-height: 24px;
128 -webkit-box-shadow: 0 3px 5px -3px #333333;
129 -moz-box-shadow: 0 3px 5px -3px #333333;
130 box-shadow: 0 3px 5px -3px #333333;
131 text-shadow: none;
132 }
133 .notice.notice-info.premio-notice {
134 position: relative;
135 padding: 1px 30px 1px 12px;
136 }
137 .notice.notice-info.premio-notice ul li {
138 margin: 0;
139 }
140 .notice.notice-info.premio-notice ul li a {
141 color: #0073aa;
142 font-size: 14px;
143 text-decoration: underline;
144 }
145 .<?php echo $this->plugin_slug ?>-premio-review-box p {
146 display: inline-block;
147 line-height: 30px;
148 vertical-align: middle;
149 padding: 0 10px 0 0;
150 }
151 .<?php echo $this->plugin_slug ?>-premio-review-box p img {
152 width: 30px;
153 height: 30px;
154 display: inline-block;
155 margin: 0 10px;
156 vertical-align: middle;
157 border-radius: 15px;
158 }
159 .review-thanks-img img {
160 width: 100%;
161 height: auto;
162 max-width: 200px;
163 }
164 .review-thanks-msg {
165 padding: 5px 0 0 10px;
166 display: inline-block;
167 text-align: left;
168 }
169 .review-thanks-box {
170 padding: 10px 0 10px 0;
171 position: relative;
172 text-align: center;
173 display: none;
174 }
175 .review-box-default {
176 }
177 .review-thanks-btn {
178 border: 0;
179 background: transparent;
180 position: absolute;
181 right: -30px;
182 top: 5px;
183 }
184 .review-thanks-img {
185 display: inline-block;
186 vertical-align: top;
187 width: 200px;
188 }
189 .thanks-msg-title {
190 font-weight: bold;
191 font-size: 18px;
192 }
193 .thanks-msg-desc {
194 padding: 24px 0;
195 }
196 .thanks-msg-footer {
197 font-weight: bold;
198 }
199 </style>
200 <div class="notice notice-info premio-notice <?php echo $this->plugin_slug ?>-premio-review-box <?php echo $this->plugin_slug ?>-premio-review-box">
201 <div class="review-box-default" id="default-review-box-<?php echo $this->plugin_slug ?>">
202 <p>
203 Hi there, it seems like <b><?php echo $this->plugin_name ?></b> is bringing you some value, and that's pretty awesome! Can you please show us some love and rate <?php echo $this->plugin_name ?> on WordPress? It'll only take 2 minutes of your time, and will really help us spread the word
204 - <b>Gal Dubinski</b>, Co-founder <img width="30px" src="<?php echo esc_url(plugin_dir_url(__FILE__)."../assets/images/premio-owner.png") ?>" />
205 <a href="javascript:;" class="dismiss-btn <?php echo $this->plugin_slug ?>-premio-review-dismiss-btn"><span class="dashicons dashicons-no-alt"></span></a>
206 </p>
207 <div class="clear clearfix"></div>
208 <ul>
209 <li><a class="<?php echo $this->plugin_slug ?>-premio-review-box-hide-btn" href="https://wordpress.org/support/plugin/folders/reviews/?filter=5" target="_blank">I'd love to help :)</a></li>
210 <li><a class="<?php echo $this->plugin_slug ?>-premio-review-box-future-btn" href="javascript:;">Not this time</a></li>
211 <li><a class="<?php echo $this->plugin_slug ?>-premio-review-box-hide-btn" href="javascript:;">I've already rated you</a></li>
212 </ul>
213 </div>
214 <div class="review-thanks-box" id="review-thanks-<?php echo $this->plugin_slug ?>">
215 <button class="<?php echo $this->plugin_slug ?>-close-thanks-btn review-thanks-btn"><span class="dashicons dashicons-no-alt"></span></button>
216
217 <div class="review-thanks-img">
218 <img width="30px" src="<?php echo esc_url(plugin_dir_url(__FILE__)."../assets/images/thanks.gif") ?>" />
219 </div>
220 <div class="review-thanks-msg">
221 <div class="thanks-msg-title">You are awesome &#128591;</div>
222 <div class="thanks-msg-desc">Thanks for your support, We really appreciate it!</div>
223 <div class="thanks-msg-footer">Premio team</div>
224 </div>
225 <div class="clear clearfix"></div>
226 </div>
227 </div>
228 <div class="<?php echo $this->plugin_slug ?>-review-box-popup">
229 <div class="<?php echo $this->plugin_slug ?>-review-box-popup-content">
230 <button class="<?php echo $this->plugin_slug ?>-close-review-box-popup"><span class="dashicons dashicons-no-alt"></span></button>
231 <div class="<?php echo $this->plugin_slug ?>-review-box-title">Would you like us to remind you about this later?</div>
232 <div class="<?php echo $this->plugin_slug ?>-review-box-options">
233 <a href="javascript:;" data-days="3">Remind me in 3 days</a>
234 <a href="javascript:;" data-days="10">Remind me in 10 days</a>
235 <a href="javascript:;" data-days="-1" class="dismiss">Don't remind me about this</a>
236 </div>
237 </div>
238 </div>
239 <script>
240 jQuery(document).ready(function(){
241 jQuery("body").addClass("has-premio-box");
242 jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-premio-review-dismiss-btn, .<?php echo $this->plugin_slug ?>-premio-review-box-future-btn", function(){
243 jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").show();
244 });
245 jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-close-review-box-popup", function(){
246 jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").hide();
247 });
248 jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-close-thanks-btn", function(){
249 jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").remove();
250 jQuery(".<?php echo $this->plugin_slug ?>-premio-review-box").remove();
251 });
252 jQuery(document).on("click",".<?php echo $this->plugin_slug ?>-premio-review-box-hide-btn",function(){
253 jQuery("#default-review-box-<?php echo $this->plugin_slug ?>").hide();
254 jQuery("#review-thanks-<?php echo $this->plugin_slug ?>").show();
255 jQuery.ajax({
256 url: "<?php echo admin_url("admin-ajax.php") ?>",
257 data: "action=<?php echo esc_attr($this->plugin_slug) ?>_review_box&days=-1&nonce=<?php echo esc_attr(wp_create_nonce($this->plugin_slug."_review_box")) ?>",
258 type: "post",
259 success: function() {
260
261 }
262 });
263 });
264 jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-review-box-options a", function(){
265 var dataDays = jQuery(this).attr("data-days");
266 jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").remove();
267 jQuery(".<?php echo $this->plugin_slug ?>-premio-review-box").remove();
268 jQuery("body").removeClass("has-premio-box");
269 jQuery.ajax({
270 url: "<?php echo admin_url("admin-ajax.php") ?>",
271 data: "action=<?php echo esc_attr($this->plugin_slug) ?>_review_box&days="+dataDays+"&nonce=<?php echo esc_attr(wp_create_nonce($this->plugin_slug."_review_box")) ?>",
272 type: "post",
273 success: function() {
274 jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").remove();
275 jQuery(".<?php echo $this->plugin_slug ?>-premio-review-box").remove();
276 }
277 });
278 });
279 });
280 </script>
281 <?php
282 }
283 }
284 }
285 $folders_review_box = new folders_review_box();