PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | admin/views/notices/review.php +10 -31 4.0.7 → 2.2.10 View file →
@@ -8,21 +8,10 @@
8 8 * @package Smart_Post_Show
9 9 * @subpackage Smart_Post_Show/admin/views/notices
10 10 * @author ShapedPlugin<[email protected]>
11 11 */
12 -
13 -if ( ! defined( 'ABSPATH' ) ) {
14 - exit; // Exit if accessed directly.
15 -}
16 -
17 -/**
18 - * The admin review notice.
19 - */
20 12 class SPS_Review {
21 13
22 - /**
23 - * Initialize the class and set its properties.
24 - */
25 14 public function __construct() {
26 15 add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
27 16 add_action( 'wp_ajax_smart-post-show-never-show-review-notice', array( $this, 'dismiss_review_notice' ) );
28 17 }
@@ -60,24 +49,22 @@
60 49 // If we cannot load, return early.
61 50 if ( ! $load ) {
62 51 return;
63 52 }
64 -
65 - $plugin_logo_image = SP_PC_URL . 'admin/assets/img/icon-256x256.gif';
66 -
67 53 ?>
68 54 <div id="smart-post-show-review-notice" class="smart-post-show-review-notice">
69 55 <div class="sp-sps-plugin-icon">
70 - <img src="<?php echo esc_url( $plugin_logo_image ); ?>" alt="Smart Post">
56 + <img src="<?php echo SP_PC_URL . 'admin/assets/img/images/sps-icon.svg'; ?>" alt="Smart Post Show">
71 57 </div>
72 58 <div class="sp-sps-notice-text">
73 - <h3>Enjoying <strong>Smart Post</strong>?</h3>
74 - <p>We hope you had a wonderful experience using <strong>Smart Post</strong>. Please take a moment to leave a review on <a href="https://wordpress.org/support/plugin/post-carousel/reviews/" target="_blank"><strong>WordPress.org</strong></a>?
75 - Your positive review will help us improve. Thank you! 😊</p>
59 + <h3>Enjoying <strong>Smart Post Show</strong>?</h3>
60 + <p>Hope that you had a good experience with the <strong>Smart Post Show</strong>. Would you please show us a little love by rating us in the <a href="https://wordpress.org/support/plugin/post-carousel/reviews/?filter=5#new-post" target="_blank"><strong>WordPress.org</strong></a>?
61 + Just a minute to rate it. Thank you!</p>
76 62
77 63 <p class="sp-sps-review-actions">
78 - <a href="https://wordpress.org/support/plugin/post-carousel/reviews/" target="_blank" class="button button-primary notice-dismissed rate-testimonial">Ok, you deserve ★★★★★</a>
79 - <a href="#" class="notice-dismissed remind-me-later"><span class="dashicons dashicons-clock"></span>Nope, maybe later</a>
64 + <a href="https://wordpress.org/support/plugin/post-carousel/reviews/?filter=5#new-post" target="_blank" class="button button-primary notice-dismissed rate-testimonial">Rate Smart Post Show</a>
65 + <a href="#" class="notice-dismissed remind-me-later"><span class="dashicons dashicons-clock"></span>Nope, maybe later
66 +</a>
80 67 <a href="#" class="notice-dismissed never-show-again"><span class="dashicons dashicons-dismiss"></span>Never show again</a>
81 68 </p>
82 69 </div>
83 70 </div>
@@ -99,10 +86,9 @@
99 86 }
100 87
101 88 $.post( ajaxurl, {
102 89 action: 'smart-post-show-never-show-review-notice',
103 - notice_dismissed_data : notice_dismissed_value,
104 - nonce: '<?php echo esc_attr( wp_create_nonce( 'sps_review_notice' ) ); ?>'
90 + notice_dismissed_data : notice_dismissed_value
105 91 });
106 92
107 93 $('#smart-post-show-review-notice.smart-post-show-review-notice').hide();
108 94 });
@@ -119,22 +105,15 @@
119 105 *
120 106 * @return void
121 107 **/
122 108 public function dismiss_review_notice() {
123 -
124 - if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['nonce'] ) ), 'sps_review_notice' ) ) {
125 - return;
126 - }
127 -
128 - $review = get_option( 'smart_post_show_review_notice_dismiss' );
129 109 if ( ! $review ) {
130 110 $review = array();
131 111 }
132 - $notice_dismissed_data = isset( $_POST['notice_dismissed_data'] ) ? sanitize_key( wp_unslash( $_POST['notice_dismissed_data'] ) ) : '';
133 - switch ( $notice_dismissed_data ) {
112 + switch ( $_POST['notice_dismissed_data'] ) {
134 113 case '1':
135 114 $review['time'] = time();
136 - $review['dismissed'] = true;
115 + $review['dismissed'] = false;
137 116 break;
138 117 case '2':
139 118 $review['time'] = time();
140 119 $review['dismissed'] = false;