| @@ -55,17 +55,14 @@ | ||
| 55 | 55 | $current = time(); |
| 56 | 56 | $start = strtotime( $this->options['start_date'] ); |
| 57 | 57 | $end = strtotime( $this->options['end_date'] ); |
| 58 | 58 | |
| 59 | - if ( $this->options['global_check'] ) { | |
| 60 | - return; | |
| 61 | - } | |
| 62 | - | |
| 59 | + $global = $this->options['global_check'] ?? 'rtsb__notice'; | |
| 63 | 60 | // Black Friday Notice. |
| 64 | - if ( ! rtsb()->has_pro() && $start <= $current && $current <= $end ) { | |
| 61 | + if ( $start <= $current && $current <= $end ) { | |
| 65 | 62 | if ( get_option( $this->options['option_name'] ) != '1' ) { |
| 66 | - if ( ! isset( $GLOBALS['rtsb__notice'] ) ) { | |
| 67 | - $GLOBALS['rtsb__notice'] = 'rtsb__notice'; | |
| 63 | + if ( ! isset( $GLOBALS[ $global ] ) ) { | |
| 64 | + $GLOBALS[ $global ] = $global; | |
| 68 | 65 | $this->offer_notice(); |
| 69 | 66 | } |
| 70 | 67 | } |
| 71 | 68 | } |
| @@ -152,8 +149,18 @@ | ||
| 152 | 149 | background: 0 0; |
| 153 | 150 | color: var(--e-button-context-color); |
| 154 | 151 | background: #fff; |
| 155 | 152 | } |
| 153 | + | |
| 154 | + .rtsb-offer-notice .offer-footer { | |
| 155 | + padding-top: 10px; | |
| 156 | + } | |
| 157 | + | |
| 158 | + .rtsb-offer-notice .notice-text b { | |
| 159 | + display: inline-block; | |
| 160 | + transform: skewX(-10deg); | |
| 161 | + line-height: 1; | |
| 162 | + } | |
| 156 | 163 | </style> |
| 157 | 164 | |
| 158 | 165 | <div class="rtsb-offer-notice notice notice-info is-dismissible" |
| 159 | 166 | data-rtsbdismissable="rtsb_offer"> |
| @@ -160,14 +167,14 @@ | ||
| 160 | 167 | <img alt="<?php echo esc_attr( $this->options['plugin_name'] ); ?>" |
| 161 | 168 | src="<?php echo esc_url( $this->options['image_url'] ); ?>" |
| 162 | 169 | width="100px" |
| 163 | 170 | height="100px"/> |
| 164 | - <h3><?php echo sprintf( '%s – %s', esc_html( $this->options['plugin_name'] ), esc_html( $this->options['notice_for'] ) ); ?></h3> | |
| 171 | + <h3 style="display: flex; align-items: center;"><?php echo sprintf( '%s – %s', esc_html( $this->options['plugin_name'] ), wp_kses_post( $this->options['notice_for'] ) ); ?></h3> | |
| 165 | 172 | |
| 166 | 173 | <p class="notice-text"> |
| 167 | 174 | <?php echo wp_kses_post( $this->options['notice_message'] ); ?> |
| 168 | 175 | </p> |
| 169 | - <p> | |
| 176 | + <p class="offer-footer" style="display: flex; align-items: center;"> | |
| 170 | 177 | <a class="button button-primary" |
| 171 | 178 | href="<?php echo esc_url( $this->options['download_link'] ); ?>" target="_blank">Buy Now</a> |
| 172 | 179 | <a class="button button-dismiss" href="#">Dismiss</a> |
| 173 | 180 | </p> |
| @@ -173,9 +180,10 @@ | ||
| 173 | 180 | </p> |
| 174 | 181 | </div> |
| 175 | 182 | |
| 176 | 183 | <?php |
| 177 | - } | |
| 184 | + }, | |
| 185 | + 9 | |
| 178 | 186 | ); |
| 179 | 187 | |
| 180 | 188 | add_action( |
| 181 | 189 | 'admin_footer', |