PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | includes/class-wpdirectorykit-review-request.php +11 -9 1.2.6 → 1.5.9 View file →
@@ -249,9 +249,11 @@
249 249 static $triggers;
250 250
251 251 if ( ! isset( $triggers ) ) {
252 252
253 + /* translators: %d: Number of popup views. */
253 254 $open_message = __( 'Hey, I noticed you recently hit %d popup views on your site – that’s awesome!. I would very much appreciate if you could quickly give it a 5-star rating on WordPress, just to help us spread the word.', 'wpdirectorykit' );
255 + /* translators: %s: Time period (e.g. 1 week). */
254 256 $time_message = __( "Hey, you've been using WP Directory Kit for %s on your site - I hope that its been helpful. I would very much appreciate if you could quickly give it a 5-star rating on WordPress, just to help us spread the word and motivate us to make it even better.", 'wpdirectorykit' );
255 257
256 258 $triggers = apply_filters( 'wpdirectorykit_reviews_triggers', array(
257 259 'time_installed' => array(
@@ -286,9 +288,9 @@
286 288 ),
287 289 'open_count' => array(
288 290 'triggers' => array(
289 291 '50_opens' => array(
290 - 'message' => sprintf( $open_message, 50 ),
292 + 'message' => (strpos($open_message, '%d') !== false) ? sprintf( $open_message, 50 ) : $open_message,
291 293 'conditions' => array(
292 294 get_option( 'wpdirectorykit_total_open_count', 0 ) > 50,
293 295 ),
294 296 'link' => 'https://wordpress.org/support/plugin/wpdirectorykit/reviews/?rate=5#rate-response',
@@ -294,9 +296,9 @@
294 296 'link' => 'https://wordpress.org/support/plugin/wpdirectorykit/reviews/?rate=5#rate-response',
295 297 'pri' => 10,
296 298 ),
297 299 '100_opens' => array(
298 - 'message' => sprintf( $open_message, 100 ),
300 + 'message' => (strpos($open_message, '%d') !== false) ? sprintf( $open_message, 100 ) : $open_message,
299 301 'conditions' => array(
300 302 get_option( 'wpdirectorykit_total_open_count', 0 ) > 100,
301 303
302 304 ),
@@ -303,9 +305,9 @@
303 305 'link' => 'https://wordpress.org/support/plugin/wpdirectorykit/reviews/?rate=5#rate-response',
304 306 'pri' => 20,
305 307 ),
306 308 '500_opens' => array(
307 - 'message' => sprintf( $open_message, 500 ),
309 + 'message' => (strpos($open_message, '%d') !== false) ? sprintf( $open_message, 500 ) : $open_message,
308 310 'conditions' => array(
309 311 get_option( 'wpdirectorykit_total_open_count', 0 ) > 500,
310 312 ),
311 313 'link' => 'https://wordpress.org/support/plugin/wpdirectorykit/reviews/?rate=5#rate-response',
@@ -369,9 +371,9 @@
369 371 dataType: "json",
370 372 url: ajaxurl,
371 373 data: {
372 374 action: 'wpdirectorykit_review_action',
373 - nonce: '<?php echo wp_create_nonce( 'wpdirectorykit_review_action' ); ?>',
375 + nonce: '<?php echo esc_js(wp_create_nonce( 'wpdirectorykit_review_action' )); ?>',
374 376 group: trigger.group,
375 377 code: trigger.code,
376 378 pri: trigger.pri,
377 379 reason: reason
@@ -433,9 +435,9 @@
433 435
434 436 <div class="notice notice-success is-dismissible wpdirectorykit-notice">
435 437
436 438 <p>
437 - <img class="logo" src="<?php echo WPDIRECTORYKIT_URL; ?>admin/img/icon-256x256.jpg" />
439 + <img class="logo" src="<?php echo esc_url(WPDIRECTORYKIT_URL); ?>admin/img/icon-256x256.jpg" />
438 440 <strong>
439 441 <?php echo esc_html($tigger['message']); ?>
440 442 <br />
441 443 ~ WP Directory Kit
@@ -443,24 +445,24 @@
443 445 </p>
444 446 <ul>
445 447 <li>
446 448 <a class="wpdirectorykit-dismiss" target="_blank" href="https://wordpress.org/support/plugin/wpdirectorykit/reviews/?rate=5#rate-response" data-reason="am_now">
447 - <strong><?php _e( 'Ok, I will help you with 5 star rating', 'wpdirectorykit' ); ?></strong>
449 + <strong><?php esc_html_e( 'Ok, I will help you with 5 star rating', 'wpdirectorykit' ); ?></strong>
448 450 </a>
449 451 </li>
450 452 <li>
451 453 <a href="https://wpdirectorykit.com/contact.html" target="_blank"class="wpdirectorykit-dismiss" data-reason="improve_suggestion">
452 - <?php _e( 'No, you doesn\'t deserver 5 stars and I will tell you why!', 'wpdirectorykit' ); ?>
454 + <?php esc_html_e( 'No, you doesn\'t deserver 5 stars and I will tell you why!', 'wpdirectorykit' ); ?>
453 455 </a>
454 456 </li>
455 457 <li>
456 458 <a href="#" class="wpdirectorykit-dismiss" data-reason="maybe_later">
457 - <?php _e( 'Nope, maybe later', 'wpdirectorykit' ); ?>
459 + <?php esc_html_e( 'Nope, maybe later', 'wpdirectorykit' ); ?>
458 460 </a>
459 461 </li>
460 462 <li>
461 463 <a href="#" class="wpdirectorykit-dismiss" data-reason="already_did">
462 - <?php _e( 'I already did', 'wpdirectorykit' ); ?>
464 + <?php esc_html_e( 'I already did', 'wpdirectorykit' ); ?>
463 465 </a>
464 466 </li>
465 467 </ul>
466 468