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 +3 -18 2.4.21 → 2.2.10 View file →
@@ -8,17 +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 -/**
14 - * The admin review notice.
15 - */
16 12 class SPS_Review {
17 13
18 - /**
19 - * Initialize the class and set its properties.
20 - */
21 14 public function __construct() {
22 15 add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
23 16 add_action( 'wp_ajax_smart-post-show-never-show-review-notice', array( $this, 'dismiss_review_notice' ) );
24 17 }
@@ -59,9 +52,9 @@
59 52 }
60 53 ?>
61 54 <div id="smart-post-show-review-notice" class="smart-post-show-review-notice">
62 55 <div class="sp-sps-plugin-icon">
63 - <img src="<?php echo esc_url( SP_PC_URL . 'admin/assets/img/images/sps-icon.svg' ); ?>" alt="Smart Post Show">
56 + <img src="<?php echo SP_PC_URL . 'admin/assets/img/images/sps-icon.svg'; ?>" alt="Smart Post Show">
64 57 </div>
65 58 <div class="sp-sps-notice-text">
66 59 <h3>Enjoying <strong>Smart Post Show</strong>?</h3>
67 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>?
@@ -93,10 +86,9 @@
93 86 }
94 87
95 88 $.post( ajaxurl, {
96 89 action: 'smart-post-show-never-show-review-notice',
97 - notice_dismissed_data : notice_dismissed_value,
98 - nonce: '<?php echo esc_attr( wp_create_nonce( 'sps_review_notice' ) ); ?>'
90 + notice_dismissed_data : notice_dismissed_value
99 91 });
100 92
101 93 $('#smart-post-show-review-notice.smart-post-show-review-notice').hide();
102 94 });
@@ -113,19 +105,12 @@
113 105 *
114 106 * @return void
115 107 **/
116 108 public function dismiss_review_notice() {
117 - $post_data = wp_unslash( $_POST );
118 -
119 - if ( ! isset( $post_data['nonce'] ) || ! wp_verify_nonce( sanitize_key( $post_data['nonce'] ), 'sps_review_notice' ) ) {
120 - return;
121 - }
122 -
123 - $review = get_option( 'smart_post_show_review_notice_dismiss' );
124 109 if ( ! $review ) {
125 110 $review = array();
126 111 }
127 - switch ( isset( $post_data['notice_dismissed_data'] ) ? $post_data['notice_dismissed_data'] : '' ) {
112 + switch ( $_POST['notice_dismissed_data'] ) {
128 113 case '1':
129 114 $review['time'] = time();
130 115 $review['dismissed'] = false;
131 116 break;