| @@ -162,13 +162,8 @@ | ||
| 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 | - | |
| 171 | 166 | $dismiss_notice = get_option( 'weforms_review_notice_dismiss', 'no' ); |
| 172 | 167 | $activation_time = get_option( 'weforms_installed' ); |
| 173 | 168 | $total_entries = weforms_count_entries(); |
| 174 | 169 | |
| @@ -192,59 +187,39 @@ | ||
| 192 | 187 | && $form_published < 3 |
| 193 | 188 | ) { |
| 194 | 189 | return; |
| 195 | 190 | } ?> |
| 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> | |
| 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> | |
| 245 | 217 | </div> |
| 246 | 218 | <style type="text/css"> |
| 219 | + #weforms-review-notice .notice-dismiss { | |
| 220 | + padding: 0 0 0 26px; | |
| 221 | + } | |
| 247 | 222 | |
| 248 | 223 | #weforms-review-notice .notice-dismiss:before { |
| 249 | 224 | display: none; |
| 250 | 225 | } |
| @@ -249,22 +224,15 @@ | ||
| 249 | 224 | display: none; |
| 250 | 225 | } |
| 251 | 226 | |
| 252 | 227 | #weforms-review-notice.weforms-review-notice { |
| 228 | + padding: 15px 15px 15px 0; | |
| 253 | 229 | background-color: #fff; |
| 254 | 230 | border-radius: 3px; |
| 255 | - margin: 5px 0 15px; | |
| 231 | + margin: 20px 20px 0 0; | |
| 232 | + border-left: 4px solid transparent; | |
| 256 | 233 | } |
| 257 | 234 | |
| 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 | - | |
| 267 | 235 | #weforms-review-notice .weforms-review-thumbnail { |
| 268 | 236 | width: 114px; |
| 269 | 237 | float: left; |
| 270 | 238 | line-height: 80px; |
| @@ -287,12 +255,8 @@ | ||
| 287 | 255 | font-weight: 400; |
| 288 | 256 | line-height: 1.3; |
| 289 | 257 | } |
| 290 | 258 | |
| 291 | - #weforms-review-notice .weforms-review-links { | |
| 292 | - margin: 0.5em 0; | |
| 293 | - } | |
| 294 | - | |
| 295 | 259 | #weforms-review-notice .weforms-review-text p { |
| 296 | 260 | font-size: 13px; |
| 297 | 261 | margin: 0 0 5px; |
| 298 | 262 | } |
| @@ -307,17 +271,19 @@ | ||
| 307 | 271 | margin-right: 15px; |
| 308 | 272 | } |
| 309 | 273 | |
| 310 | 274 | #weforms-review-notice .weforms-review-ul li a { |
| 311 | - display: flex; | |
| 312 | - align-items: center; | |
| 313 | - justify-content: space-between; | |
| 275 | + display: inline-block; | |
| 276 | + color: #82C776; | |
| 314 | 277 | text-decoration: none; |
| 278 | + padding-left: 26px; | |
| 315 | 279 | position: relative; |
| 316 | 280 | } |
| 317 | 281 | |
| 318 | 282 | #weforms-review-notice .weforms-review-ul li a span { |
| 319 | - margin-right: 10px; | |
| 283 | + position: absolute; | |
| 284 | + left: 0; | |
| 285 | + top: -2px; | |
| 320 | 286 | } |
| 321 | 287 | </style> |
| 322 | 288 | <script type='text/javascript'> |
| 323 | 289 | jQuery('body').on('click', '#weforms-review-notice .notice-dismiss', function (e) { |