class-admin-feed-columns.php
10 months ago
class-admin-menu.php
2 years ago
class-admin-notice.php
1 year ago
class-admin-page.php
3 years ago
class-admin-rateus-ajax.php
1 year ago
class-admin-rev.php
1 year ago
class-admin-tophead.php
1 year ago
class-admin-tophead.php
91 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WP_Rplg_Google_Reviews\Includes\Admin; |
| 4 | |
| 5 | class Admin_Tophead { |
| 6 | |
| 7 | public function register() { |
| 8 | add_action('wp_after_admin_bar_render', array($this, 'render')); |
| 9 | } |
| 10 | |
| 11 | public function render() { |
| 12 | $current_screen = get_current_screen(); |
| 13 | |
| 14 | if (empty($current_screen)) { |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | if (strpos($current_screen->id, 'grw') !== false) { |
| 19 | |
| 20 | $current_screen->render_screen_meta(); |
| 21 | |
| 22 | $now = time(); |
| 23 | $bfs = strtotime('2024-11-28 00:01:10'); |
| 24 | $bfe = strtotime('2024-12-02 00:01:15'); |
| 25 | $cms = strtotime('2024-12-02 00:01:20'); |
| 26 | $cme = strtotime('2024-12-04 00:01:10'); |
| 27 | |
| 28 | ?> |
| 29 | <div class="grw-tophead"> |
| 30 | <div class="grw-tophead-title"> |
| 31 | <!--span class="grw-tophead-logo" style="position: relative; margin-right: 10px; vertical-align: middle"> |
| 32 | <svg width="32" height="32" viewBox="0 0 1792 1792"><path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#FABB08"></path></svg> |
| 33 | <svg width="18" height="18" viewBox="-5 -5 10 10" style="position: absolute;bottom: 2px;right: 4px;outline: 2px solid #fff;border-radius: 50%;background: #fff;"> |
| 34 | <defs> |
| 35 | <path id="a" d="M 3 0 A 3.1 3.1 0 0 0 0 -3 L 0 -5 A 5 5 0 0 1 5 0"/> |
| 36 | </defs> |
| 37 | <use xlink:href="#a" fill="#4285F4" transform="rotate(45)"/> |
| 38 | <use xlink:href="#a" fill="#34A853" transform="rotate(135)"/> |
| 39 | <use xlink:href="#a" fill="#FABB08" transform="rotate(225)"/> |
| 40 | <use xlink:href="#a" fill="#E94135" transform="rotate(315)"/> |
| 41 | </svg> |
| 42 | <svg width="12" height="12" viewBox="0 0 512 512" style="position: absolute; bottom: 7px; right: 9px; width: 8px; height: 8px; border-radius: 50%;"><path fill="#34A853" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" style=" |
| 43 | "></path></svg> |
| 44 | </span!--> |
| 45 | <img src="<?php esc_attr_e(GRW_ASSETS_URL . 'img/logo.png') ?>" alt="logo"> |
| 46 | Google Reviews |
| 47 | </div> |
| 48 | <div class="grw-version"> |
| 49 | <div class="grw-version-free">Free Version: <?php echo GRW_VERSION; ?></div> |
| 50 | <div class="grw-version-upgrade"> |
| 51 | <?php if ($now > $bfs && $now < $bfe) { ?> |
| 52 | <span class="grw-bf"> |
| 53 | <span class="grw-b">black</span> |
| 54 | <span class="grw-f">friday</span> |
| 55 | <span class="grw-s">%</span> |
| 56 | </span> |
| 57 | <div id="grw-upgrade-tips"> |
| 58 | <div class="grw-upgrade-head">Incredible sales, only on <span class="grw-b">Black</span><span class="grw-f">Friday</span></div> |
| 59 | Hurry up and buy the business version with a <span class="grw-s">50% OFF</span>!<br> |
| 60 | <p style="font-size:15px">The business version displays all reviews, constantly synchronizes and receives new ones automatically, works without an API key, billing and contains a huge number of features!</p> |
| 61 | <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin?promo=BF2024K7D4T#pricing" target="_blank">Upgrade today with 50% OFF!</a> |
| 62 | </div> |
| 63 | <?php } elseif ($now > $cms && $now < $cme) { ?> |
| 64 | <span class="grw-bf"> |
| 65 | <span class="grw-b">cyber</span> |
| 66 | <span class="grw-m">monday</span> |
| 67 | <span class="grw-s">%</span> |
| 68 | </span> |
| 69 | <div id="grw-upgrade-tips"> |
| 70 | <div class="grw-upgrade-head">Incredible sales, only on <span class="grw-b">Cyber</span><span class="grw-m">Monday</span></div> |
| 71 | Hurry up and buy the business version with a <span class="grw-s">50% OFF</span>!<br> |
| 72 | <p style="font-size:15px">The business version displays all reviews, constantly synchronizes and receives new ones automatically, works without an API key, billing and contains a huge number of features!</p> |
| 73 | <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin?promo=BF2024K7D4T#pricing" target="_blank">Upgrade today with 50% OFF!</a> |
| 74 | </div> |
| 75 | <?php } else { ?> |
| 76 | <span class="grw-upgrade-text">Upgrade to business</span> |
| 77 | <div id="grw-upgrade-tips"> |
| 78 | <div class="grw-upgrade-head">Most easiest way to show all G reviews with business version</div> |
| 79 | No Place ID, No API key, No Billing needed, only Google My Business (GMB) owner account to show all G reviews with constantly auto synced |
| 80 | <!--div>30% off with promo code: GRGROW23</div--> |
| 81 | <a href="https://richplugins.com/business-reviews-bundle-wordpress-plugin?promo=GRGROW23" target="_blank">Upgrade today with 30% off!</a> |
| 82 | </div> |
| 83 | <?php } ?> |
| 84 | </div> |
| 85 | </div> |
| 86 | </div> |
| 87 | <?php |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 |