@@ -163,6 +163,11 @@ public function weforms_review_notice_message() {
163163 return ;
164164 }
165165
166+ $ screen = get_current_screen ();
167+ if ( $ screen && $ screen ->base && 'toplevel_page_weforms ' !== $ screen ->base ) {
168+ return ;
169+ }
170+
166171 $ dismiss_notice = get_option ( 'weforms_review_notice_dismiss ' , 'no ' );
167172 $ activation_time = get_option ( 'weforms_installed ' );
168173 $ total_entries = weforms_count_entries ();
@@ -188,50 +193,77 @@ public function weforms_review_notice_message() {
188193 ) {
189194 return ;
190195 } ?>
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>
217245 </div>
218246 <style type="text/css">
219- #weforms-review-notice .notice-dismiss {
220- padding: 0 0 0 26px;
221- }
222247
223248 #weforms-review-notice .notice-dismiss:before {
224249 display: none;
225250 }
226251
227252 #weforms-review-notice.weforms-review-notice {
228- padding: 15px 15px 15px 0;
229253 background-color: #fff;
230254 border-radius: 3px;
231- margin: 20px 20px 0 0;
232- border-left: 4px solid transparent;
255+ margin: 5px 0 15px;
233256 }
234257
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+
235267 #weforms-review-notice .weforms-review-thumbnail {
236268 width: 114px;
237269 float: left;
@@ -256,6 +288,10 @@ class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'Never show again',
256288 line-height: 1.3;
257289 }
258290
291+ #weforms-review-notice .weforms-review-links {
292+ margin: 0.5em 0;
293+ }
294+
259295 #weforms-review-notice .weforms-review-text p {
260296 font-size: 13px;
261297 margin: 0 0 5px;
@@ -272,17 +308,15 @@ class="dashicons dashicons-dismiss"></span><?php esc_html_e( 'Never show again',
272308 }
273309
274310 #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;
277314 text-decoration: none;
278- padding-left: 26px;
279315 position: relative;
280316 }
281317
282318 #weforms-review-notice .weforms-review-ul li a span {
283- position: absolute;
284- left: 0;
285- top: -2px;
319+ margin-right: 10px;
286320 }
287321 </style>
288322 <script type='text/javascript'>
0 commit comments