| @@ -1,5 +1,5 @@ | ||
| 1 | -<?php if (!defined('WPO_PLUGIN_MAIN_PATH')) die('No direct access allowed'); ?> | |
| 1 | +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> | |
| 2 | 2 | |
| 3 | 3 | <?php if (!empty($button_meta) && 'review' == $button_meta) : ?> |
| 4 | 4 | |
| 5 | 5 | <div class="updraft-ad-container updated below-h2"> |
| @@ -4,13 +4,13 @@ | ||
| 4 | 4 | |
| 5 | 5 | <div class="updraft-ad-container updated below-h2"> |
| 6 | 6 | <div class="updraft_notice_container updraft_review_notice_container"> |
| 7 | 7 | <div class="updraft_advert_content_left_extra"> |
| 8 | - <img src="<?php echo esc_url(WPO_PLUGIN_URL.'images/'.$image);?>" width="85" alt="<?php esc_attr_e('notice image', 'wp-optimize');?>"> | |
| 8 | + <img src="<?php echo esc_url(WPO_PLUGIN_URL.'images/'.$image); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" width="85" alt="<?php esc_attr_e('notice image', 'wp-optimize');?>"> | |
| 9 | 9 | </div> |
| 10 | 10 | <div class="updraft_advert_content_right"> |
| 11 | 11 | <p> |
| 12 | - <?php echo $text; ?> | |
| 12 | + <?php echo wp_kses_post($text); ?> | |
| 13 | 13 | </p> |
| 14 | 14 | |
| 15 | 15 | <?php if (!empty($button_link)) { ?> |
| 16 | 16 | <div class="updraft_advert_button_container"> |
| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | |
| 35 | 35 | <div class="updraft-ad-container updated below-h2"> |
| 36 | 36 | <div class="updraft_notice_container"> |
| 37 | 37 | <div class="updraft_advert_content_left"> |
| 38 | - <img src="<?php echo esc_url(WPO_PLUGIN_URL.'images/'.$image); ?>" width="60" height="60" alt="<?php esc_attr_e('notice image', 'wp-optimize'); ?>"> | |
| 38 | + <img src="<?php echo esc_url(WPO_PLUGIN_URL.'images/'.$image); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" width="60" height="60" alt="<?php esc_attr_e('notice image', 'wp-optimize'); ?>"> | |
| 39 | 39 | </div> |
| 40 | 40 | <div class="updraft_advert_content_right"> |
| 41 | 41 | <h3 class="updraft_advert_heading"> |
| 42 | 42 | <?php |
| @@ -52,31 +52,35 @@ | ||
| 52 | 52 | </div> |
| 53 | 53 | </h3> |
| 54 | 54 | <p> |
| 55 | 55 | <?php |
| 56 | - echo $text; | |
| 56 | + echo wp_kses_post($text); | |
| 57 | 57 | $button_text = ''; |
| 58 | 58 | if (isset($discount_code)) echo ' <b>' . esc_html($discount_code) . '</b>'; |
| 59 | 59 | |
| 60 | - if (!empty($button_link) && !empty($button_meta)) { | |
| 60 | + if (!empty($button_link) && !empty($button_meta) && 'no-button' !== $button_meta) { | |
| 61 | 61 | // Check which Message is going to be used. |
| 62 | - if ('updraftcentral' == $button_meta) { | |
| 62 | + if ('updraftcentral' === $button_meta) { | |
| 63 | 63 | $button_text = __('Get UpdraftCentral', 'wp-optimize'); |
| 64 | - } elseif ('updraftplus' == $button_meta) { | |
| 64 | + } elseif ('updraftplus' === $button_meta) { | |
| 65 | 65 | $button_text = __('Get UpdraftPlus', 'wp-optimize'); |
| 66 | - } elseif ('signup' == $button_meta) { | |
| 66 | + } elseif ('aios' === $button_meta) { | |
| 67 | + $button_text = __('Get AIOS', 'wp-optimize'); | |
| 68 | + } elseif ('signup' === $button_meta) { | |
| 67 | 69 | $button_text = __('Sign up', 'wp-optimize'); |
| 68 | - } elseif ('go_there' == $button_meta) { | |
| 70 | + } elseif ('go_there' === $button_meta) { | |
| 69 | 71 | $button_text = __('Go there', 'wp-optimize'); |
| 70 | - } elseif ('wpo-premium' == $button_meta) { | |
| 72 | + } elseif ('wpo-premium' === $button_meta) { | |
| 71 | 73 | $button_text = __('Find out more.', 'wp-optimize'); |
| 72 | - } elseif ('wp-optimize' == $button_meta) { | |
| 74 | + } elseif ('wp-optimize' === $button_meta) { | |
| 73 | 75 | $button_text = __('Find out more.', 'wp-optimize'); |
| 74 | - } elseif ('collection' == $button_meta) { | |
| 76 | + } elseif ('collection' === $button_meta) { | |
| 75 | 77 | $button_text = __('Read more.', 'wp-optimize'); |
| 78 | + } elseif ('translate' === $button_meta) { | |
| 79 | + $button_text = __('Translate', 'wp-optimize'); | |
| 76 | 80 | } |
| 77 | 81 | $wp_optimize->wp_optimize_url($button_link, $button_text, null, 'class="updraft_notice_link"'); |
| 78 | - } | |
| 82 | + } | |
| 79 | 83 | ?> |
| 80 | 84 | </p> |
| 81 | 85 | </div> |
| 82 | 86 | </div> |