PluginProbe ʕ •ᴥ•ʔ
Rich Showcase for Google Reviews / 3.1
Rich Showcase for Google Reviews v3.1
6.9.8 6.9.7 6.9.6 trunk 1.4 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.5 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.7 1.6.8 1.6.9 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.4 2.4.1 2.4.2 2.5 2.5.1 2.6 2.6.1 2.6.2 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.6.1 3.7 3.8 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.8.1 4.8.2 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.7.1 5.8 5.9 5.9.1 5.9.2 5.9.3 5.9.7 6.0 6.1 6.2 6.3 6.4 6.4.1 6.5 6.6 6.6.1 6.6.2 6.7 6.8 6.8.1 6.8.2 6.9 6.9.1 6.9.2 6.9.3 6.9.4 6.9.4.1 6.9.4.2 6.9.4.3 6.9.4.4 6.9.5
widget-google-reviews / includes / admin / class-admin-rev.php
widget-google-reviews / includes / admin Last commit date
class-admin-feed-columns.php 2 years ago class-admin-menu.php 3 years ago class-admin-notice.php 3 years ago class-admin-page.php 3 years ago class-admin-rateus-ajax.php 3 years ago class-admin-rev.php 3 years ago class-admin-tophead.php 3 years ago
class-admin-rev.php
75 lines
1 <?php
2
3 namespace WP_Rplg_Google_Reviews\Includes\Admin;
4
5 class Admin_Rev {
6
7 public function register() {
8 add_action('admin_notices', array($this, 'leaverev'));
9 }
10
11 public function leaverev() {
12 $activation_time = get_option('grw_activation_time');
13
14 if ($activation_time == '') {
15 $activation_time = time() - 86400*2;
16 update_option('grw_activation_time', $activation_time);
17 }
18
19 $rev_notice = isset($_GET['grw_rev_notice']) ? $_GET['grw_rev_notice'] : '';
20 if ($rev_notice == 'later') {
21 $activation_time = time() - 86400*2;
22 update_option('grw_activation_time', $activation_time);
23 update_option('grw_rev_notice_hide', 'later');
24 } else if ($rev_notice == 'never') {
25 update_option('grw_rev_notice_hide', 'never');
26 }
27
28 $rev_notice_hide = get_option('grw_rev_notice_hide');
29 $rev_notice_show = get_option('rplg_rev_notice_show');
30
31 if ($rev_notice_show == '' || $rev_notice_show == 'grw') {
32
33 if ($rev_notice_hide != 'never' && $activation_time < (time() - 86400*3)) {
34 update_option('rplg_rev_notice_show', 'grw');
35 $class = 'notice notice-info is-dismissible';
36 $url = remove_query_arg(array('taction', 'tid', 'sortby', 'sortdir', 'opt'));
37 $url_later = esc_url(add_query_arg('grw_rev_notice', 'later', $url));
38 $url_never = esc_url(add_query_arg('grw_rev_notice', 'never', $url));
39
40 $notice = '<p style="font-weight:normal;font-size:15px;">' .
41 'Hey, I am happy to see that you\'ve been using <b>Plugin for Google Reviews</b> for a while now – that’s awesome!<br>' .
42 'Could you tell about your site and experience with the plugin in <a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" style="color:#ffb900;line-height:90%;font-size:1.5em;letter-spacing:0.03em;position:relative;top:0.08em;text-decoration:none;" target="_blank">�
43
44
45
46
47 </a> WordPress review?<br><br>' .
48 '--<br>Thanks!<br>Daniel K. founder of RichPlugins Ltd' .
49 '</p>' .
50 '<p>' .
51 '<a href="https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post" style="text-decoration:none;" target="_blank">' .
52 '<button class="button button-primary" style="margin-right:5px;">OK, you deserve it</button>' .
53 '</a>' .
54 '<a href="' . $url_later . '" style="text-decoration:none;">' .
55 '<button class="button button-secondary">Not now, maybe later</button>' .
56 '</a>' .
57 '<a href="' . $url_never . '" style="text-decoration:none;">' .
58 '<button class="button button-secondary" style="float:right;">Do not remind me again</button>' .
59 '</a>' .
60 '</p>' .
61 '<p style="color:#999;font-size:12px;">' .
62 'By the way, if you have been thinking about upgrading to the ' .
63 '<a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin?promo=GRGROW23" target="_blank">Business</a> ' .
64 'version, here is a 30% off onboard coupon -> <b>GRGROW23</b>' .
65 '</p>';
66
67 printf('<div class="%1$s" style="position:fixed;top:50px;right:20px;padding-right:30px;z-index:2;margin-left:20px">%2$s</div>', esc_attr($class), $notice);
68 } else {
69 update_option('rplg_rev_notice_show', '');
70 }
71
72 }
73 }
74 }
75