| @@ -162,8 +162,13 @@ | ||
| 162 | 162 | if ( !current_user_can( 'manage_options' ) ) { |
| 163 | 163 | return; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | + $screen = get_current_screen(); | |
| 167 | + if ( $screen && $screen->base && 'toplevel_page_weforms' !== $screen->base ) { | |
| 168 | + return; | |
| 169 | + } | |
| 170 | + | |
| 166 | 171 | $dismiss_notice = get_option( 'weforms_review_notice_dismiss', 'no' ); |
| 167 | 172 | $activation_time = get_option( 'weforms_installed' ); |
| 168 | 173 | $total_entries = weforms_count_entries(); |
| 169 | 174 | |
| @@ -187,39 +192,59 @@ | ||
| 187 | 192 | && $form_published < 3 |
| 188 | 193 | ) { |
| 189 | 194 | return; |
| 190 | 195 | } ?> |
| 191 | - <div id="weforms-review-notice" class="weforms-review-notice"> | |
| 192 | - <div class="weforms-review-thumbnail"> | |
| 193 | - <img src="<?php echo esc_attr( WEFORMS_ASSET_URI ) . '/images/icon-weforms.png' ?>" alt=""> | |
| 194 | - </div> | |
| 195 | - <div class="weforms-review-text"> | |
| 196 | - <?php if ( $total_entries >= 25 ) : ?> | |
| 197 | - <h3><?php wp_kses_post( __( 'Enjoying <strong>weForms</strong>?', 'weforms' ) ) ?></h3> | |
| 198 | - <p><?php wp_kses_post( __('Seems like you are getting a good response using <strong>weForms</strong>. Would you please show us a little love by rating us in the <a href="https://wordpress.org/support/plugin/weforms/reviews/#postform" target="_blank"><strong>WordPress.org</strong></a>?', 'weforms') ) ?></p> | |
| 199 | - <?php else: ?> | |
| 200 | - <h3><?php wp_kses_post( __( 'Enjoying <strong>weForms</strong>?', 'weforms' ) ) ?></h3> | |
| 201 | - <p><?php wp_kses_post( __( 'Hope that you had a neat and snappy experience with the tool. Would you please show us a little love by rating us in the <a href="https://wordpress.org/support/plugin/weforms/reviews/#postform" target="_blank"><strong>WordPress.org</strong></a>?', 'weforms' ) ) ?></p> | |
| 202 | - <?php endif; ?> | |
| 203 | - | |
| 204 | - <ul class="weforms-review-ul"> | |
| 205 | - <li><a href="https://wordpress.org/support/plugin/weforms/reviews/#postform" target="_blank"><span | |
| 206 | - class="dashicons dashicons-external"></span><?php esc_html_e( 'Sure! I\'d love to!', 'weforms' ) ?> | |
| 207 | - </a></li> | |
| 208 | - <li><a href="#" class="notice-dismiss"><span | |
| 209 | - class="dashicons dashicons-smiley"></span><?php esc_html_e( 'I\'ve already left a review', 'weforms' ) ?> | |
| 210 | - </a></li> | |
| 211 | - <li><a href="#" class="notice-dismiss"><span | |
| 212 | - class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'Never show again', 'weforms' ) ?> | |
| 213 | - </a> | |
| 214 | - </li> | |
| 215 | - </ul> | |
| 216 | - </div> | |
| 196 | + <div id="weforms-review-notice" class="weforms-review-notice updated notice"> | |
| 197 | + <div class="weforms-review-top"> | |
| 198 | + <p><img src="<?php echo esc_attr( WEFORMS_ASSET_URI ) . '/images/weforms-logo.png'; ?>" alt=""></p> | |
| 199 | + <div class="weforms-review-text"> | |
| 200 | + <?php if ( $total_entries >= 25 ) : ?> | |
| 201 | + <h3><?php printf( __( 'Enjoying %sweForms%s?', 'weforms' ), '<strong>', '</strong>' ); ?></h3> | |
| 202 | + <p><?php | |
| 203 | + printf( | |
| 204 | + // translators: opening <a>tag, closing </a> tag. | |
| 205 | + __( | |
| 206 | + 'Seems like you are getting a good response using weForms. Would you please show us a little love by rating us in the %sWordPress.org%s?', | |
| 207 | + 'weforms' | |
| 208 | + ), | |
| 209 | + '<a href="https://wordpress.org/support/plugin/weforms/reviews/#postform" target="_blank"><strong>', | |
| 210 | + '</strong></a>' | |
| 211 | + ); ?></p> | |
| 212 | + <?php else: ?> | |
| 213 | + <h3><?php printf( | |
| 214 | + // translators: opening <strong> tag, closing </strong> tag. | |
| 215 | + __( 'Enjoying %sweForms%s?', 'weforms' ), | |
| 216 | + '<strong>', | |
| 217 | + '</strong>' ); ?></h3> | |
| 218 | + <p><?php | |
| 219 | + printf( | |
| 220 | + // translators: opening <a> tag, closing </a> tag | |
| 221 | + __( | |
| 222 | + 'Hope that you had a neat and snappy experience with the tool. Would you please show us a little love by rating us in the %sWordPress.org%s?', | |
| 223 | + 'weforms' | |
| 224 | + ), | |
| 225 | + '<a href="https://wordpress.org/support/plugin/weforms/reviews/#postform" target="_blank"><strong>', | |
| 226 | + '</strong></a>' | |
| 227 | + ); ?></p> | |
| 228 | + <?php endif; ?> | |
| 229 | + </div> | |
| 230 | + </div> | |
| 231 | + <div class="weforms-review-links"> | |
| 232 | + <ul class="weforms-review-ul"> | |
| 233 | + <li><a class="button-primary button" href="https://wordpress.org/support/plugin/weforms/reviews/#postform" target="_blank"><span | |
| 234 | + class="dashicons dashicons-external"></span><?php esc_html_e( 'Sure! I\'d love to!', 'weforms' ) ?> | |
| 235 | + </a></li> | |
| 236 | + <li><a href="#" class="button notice-dismiss"><span | |
| 237 | + class="dashicons dashicons-smiley"></span><?php esc_html_e( 'I\'ve already left a review', 'weforms' ) ?> | |
| 238 | + </a></li> | |
| 239 | + <li><a href="#" class="button notice-dismiss"><span | |
| 240 | + class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'Never show again', 'weforms' ) ?> | |
| 241 | + </a> | |
| 242 | + </li> | |
| 243 | + </ul> | |
| 244 | + </div> | |
| 217 | 245 | </div> |
| 218 | 246 | <style type="text/css"> |
| 219 | - #weforms-review-notice .notice-dismiss { | |
| 220 | - padding: 0 0 0 26px; | |
| 221 | - } | |
| 222 | 247 | |
| 223 | 248 | #weforms-review-notice .notice-dismiss:before { |
| 224 | 249 | display: none; |
| 225 | 250 | } |
| @@ -224,15 +249,22 @@ | ||
| 224 | 249 | display: none; |
| 225 | 250 | } |
| 226 | 251 | |
| 227 | 252 | #weforms-review-notice.weforms-review-notice { |
| 228 | - padding: 15px 15px 15px 0; | |
| 229 | 253 | background-color: #fff; |
| 230 | 254 | border-radius: 3px; |
| 231 | - margin: 20px 20px 0 0; | |
| 232 | - border-left: 4px solid transparent; | |
| 255 | + margin: 5px 0 15px; | |
| 233 | 256 | } |
| 234 | 257 | |
| 258 | + #weforms-review-notice .weforms-review-top { | |
| 259 | + display: flex; | |
| 260 | + margin: 0.5em 0; | |
| 261 | + } | |
| 262 | + | |
| 263 | + #weforms-review-notice .weforms-review-top > p { | |
| 264 | + padding-right: 15px; | |
| 265 | + } | |
| 266 | + | |
| 235 | 267 | #weforms-review-notice .weforms-review-thumbnail { |
| 236 | 268 | width: 114px; |
| 237 | 269 | float: left; |
| 238 | 270 | line-height: 80px; |
| @@ -255,8 +287,12 @@ | ||
| 255 | 287 | font-weight: 400; |
| 256 | 288 | line-height: 1.3; |
| 257 | 289 | } |
| 258 | 290 | |
| 291 | + #weforms-review-notice .weforms-review-links { | |
| 292 | + margin: 0.5em 0; | |
| 293 | + } | |
| 294 | + | |
| 259 | 295 | #weforms-review-notice .weforms-review-text p { |
| 260 | 296 | font-size: 13px; |
| 261 | 297 | margin: 0 0 5px; |
| 262 | 298 | } |
| @@ -271,19 +307,17 @@ | ||
| 271 | 307 | margin-right: 15px; |
| 272 | 308 | } |
| 273 | 309 | |
| 274 | 310 | #weforms-review-notice .weforms-review-ul li a { |
| 275 | - display: inline-block; | |
| 276 | - color: #82C776; | |
| 311 | + display: flex; | |
| 312 | + align-items: center; | |
| 313 | + justify-content: space-between; | |
| 277 | 314 | text-decoration: none; |
| 278 | - padding-left: 26px; | |
| 279 | 315 | position: relative; |
| 280 | 316 | } |
| 281 | 317 | |
| 282 | 318 | #weforms-review-notice .weforms-review-ul li a span { |
| 283 | - position: absolute; | |
| 284 | - left: 0; | |
| 285 | - top: -2px; | |
| 319 | + margin-right: 10px; | |
| 286 | 320 | } |
| 287 | 321 | </style> |
| 288 | 322 | <script type='text/javascript'> |
| 289 | 323 | jQuery('body').on('click', '#weforms-review-notice .notice-dismiss', function (e) { |