| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | namespace ULTP; |
| 3 | 3 | defined('ABSPATH') || exit; |
| 4 | 4 | class Notice { |
| 5 | 5 | public function __construct(){ |
| 6 | - add_action('admin_notices', array($this, 'ultp_installation_notice_callback')); | |
| 6 | + //add_action('admin_notices', array($this, 'ultp_installation_notice_callback')); | |
| 7 | 7 | add_action('wp_ajax_ultp_get_pro_notice', array($this, 'set_dismiss_notice_callback')); |
| 8 | 8 | } |
| 9 | 9 | // Dismiss Notice Callback |
| 10 | 10 | public function set_dismiss_notice_callback() { |
| @@ -10,20 +10,21 @@ | ||
| 10 | 10 | public function set_dismiss_notice_callback() { |
| 11 | 11 | if (!wp_verify_nonce($_REQUEST['wpnonce'], 'ultp-free-nonce')) { |
| 12 | 12 | return ; |
| 13 | 13 | } |
| 14 | - set_transient( 'ultp_get_pro_notice_v7', 'off', 2592000 ); // 30 days notice | |
| 14 | + set_transient( 'ultp_get_pro_notice_v14', 'off', 2592000 ); // 30 days notice | |
| 15 | 15 | } |
| 16 | 16 | public function ultp_installation_notice_callback() { |
| 17 | - if (get_transient('ultp_get_pro_notice_v7') != 'off' && (!defined('ULTP_PRO_VER'))) { | |
| 17 | + if (get_transient('ultp_get_pro_notice_v14') != 'off' && (!defined('ULTP_PRO_VER'))) { | |
| 18 | 18 | $this->ultp_notice_css(); |
| 19 | 19 | $this->ultp_notice_js(); |
| 20 | 20 | ?> |
| 21 | 21 | <div class="wc-install ultp-pro-notice"> |
| 22 | 22 | <div class="wc-install-body"> |
| 23 | - <a class="wc-dismiss-notice" data-security=<?php echo wp_create_nonce('ultp-free-nonce'); ?> data-ajax=<?php echo admin_url('admin-ajax.php'); ?> href="#"><span class="dashicons dashicons-no-alt"></span></a> | |
| 24 | - <a style="line-height: 0;" target="_blank" href="https://www.wpxpo.com/gutenberg-post-blocks/?utm_campaign=go_premium"><img src="<?php echo ULTP_URL.'assets/img/banner.jpg'; ?>" alt="Offer" /></a> | |
| 25 | - </div> | |
| 23 | + <a class="wc-dismiss-notice" data-security=<?php echo wp_create_nonce('ultp-free-nonce'); ?> data-ajax=<?php echo admin_url('admin-ajax.php'); ?> href="#"><span class="dashicons dashicons-dismiss"></span></a> | |
| 24 | + <div><?php _e('Special offer for <strong>PostX - Gutenberg Post Blocks</strong>. Limited time offer. You can get <strong style="color:#e5561e;">up to 45% Off</strong> for all premium features.', 'ultimate-post'); ?></div> | |
| 25 | + <a class="button button-primary button-hero ultp-btn-notice-pro" target="_blank" href="<?php echo ultimate_post()->get_premium_link(); ?>"><span class="dashicons dashicons-image-rotate"></span><?php _e('Get Now', 'ultimate-post'); ?></a> | |
| 26 | + </div> | |
| 26 | 27 | </div> |
| 27 | 28 | <?php |
| 28 | 29 | } |
| 29 | 30 | } |
| @@ -34,13 +35,15 @@ | ||
| 34 | 35 | display: flex; |
| 35 | 36 | align-items: center; |
| 36 | 37 | background: #fff; |
| 37 | 38 | margin-top: 40px; |
| 38 | - width: calc(100% - 40px); | |
| 39 | + width: calc(100% - 50px); | |
| 40 | + /* width: calc(100% - 40px); */ | |
| 39 | 41 | border: 1px solid #ccd0d4; |
| 40 | - padding: 8px 8px 4px 8px; | |
| 42 | + /* padding: 8px 8px 4px 8px; */ | |
| 43 | + padding: 12px 15px; | |
| 41 | 44 | border-radius: 4px; |
| 42 | - /* border-left: 4px solid #e5561e; */ | |
| 45 | + border-left: 4px solid #e5561e; | |
| 43 | 46 | } |
| 44 | 47 | .wc-install img { |
| 45 | 48 | margin-right: 0; |
| 46 | 49 | max-width: 100%; |
| @@ -115,30 +118,30 @@ | ||
| 115 | 118 | .wc-dismiss-notice { |
| 116 | 119 | position: absolute; |
| 117 | 120 | text-decoration: none; |
| 118 | 121 | float: right; |
| 119 | - right: 10px; | |
| 120 | - color: #ffffff; | |
| 122 | + right: 0px; | |
| 123 | + /* color: #ffffff; */ | |
| 121 | 124 | transition: 400ms; |
| 122 | - top: 10px | |
| 125 | + top: 0px | |
| 123 | 126 | } |
| 124 | 127 | .wc-dismiss-notice .dashicons{ |
| 125 | 128 | display: inline-block; |
| 126 | 129 | text-decoration: none; |
| 127 | 130 | animation: none; |
| 128 | - font-size: 16px; | |
| 129 | - width: 25px; | |
| 131 | + font-size: 20px; | |
| 132 | + /* width: 25px; | |
| 130 | 133 | height: 25px; |
| 131 | 134 | line-height: 25px; |
| 132 | 135 | border-radius: 100px; |
| 133 | - background: #f81430; | |
| 136 | + background: #f81430; */ | |
| 134 | 137 | } |
| 135 | - .wc-dismiss-notice:hover { | |
| 138 | + /* .wc-dismiss-notice:hover { | |
| 136 | 139 | color: #fff; |
| 137 | - } | |
| 138 | - .wc-dismiss-notice:hover .dashicons{ | |
| 140 | + } */ | |
| 141 | + /* .wc-dismiss-notice:hover .dashicons{ | |
| 139 | 142 | background: #cc142a; |
| 140 | - } | |
| 143 | + } */ | |
| 141 | 144 | </style> |
| 142 | 145 | <?php |
| 143 | 146 | } |
| 144 | 147 | public function ultp_notice_js() { ?> |