| @@ -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( |
| @@ -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 | |