| @@ -1,5 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical. | |
| 3 | +// phpcs:disable PluginCheck.CodeAnalysis.Offloading.OffloadedContent -- HTML email assets must be remote. | |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | + exit; | |
| 6 | +} | |
| 2 | 7 | if ( empty( $args ) ) { |
| 3 | 8 | return; |
| 4 | 9 | } |
| 5 | 10 | |
| @@ -99,9 +104,9 @@ | ||
| 99 | 104 | <h3 style="font-size: 12px; line-height: 1em; color: #6e6e73; font-weight: 600; text-transform: uppercase; padding-bottom: 5px; margin: 0;"><?php esc_html_e( 'Total Views', 'betterdocs' ); ?></h3> |
| 100 | 105 | <h2 style="font-size: 22px; line-height: 1em; font-weight: 700; color: #1d1d1f; margin: 0;"> |
| 101 | 106 | <?php |
| 102 | 107 | echo esc_html( $views ); |
| 103 | - echo $view_arrow; | |
| 108 | + echo wp_kses_post( $view_arrow ); | |
| 104 | 109 | ?> |
| 105 | 110 | <span style="font-size: 14px; line-height: 1.1em; font-weight: 600; color: <?php echo esc_attr( $view_color ); ?>; margin-left: 5px;"> |
| 106 | 111 | <?php echo esc_html( $percentage_views ); ?>% |
| 107 | 112 | </span> |
| @@ -118,9 +123,9 @@ | ||
| 118 | 123 | <h3 style="font-size: 12px; line-height: 1em; color: #6e6e73; font-weight: 600; text-transform: uppercase; padding-bottom: 5px; margin: 0;"><?php esc_html_e( 'Total Searches', 'betterdocs' ); ?></h3> |
| 119 | 124 | <h2 style="font-size: 22px; line-height: 1em; font-weight: 700; color: #1d1d1f; margin: 0;"> |
| 120 | 125 | <?php |
| 121 | 126 | echo esc_html( $total_search ); |
| 122 | - echo $search_arrow; | |
| 127 | + echo wp_kses_post( $search_arrow ); | |
| 123 | 128 | ?> |
| 124 | 129 | <span style="font-size: 14px; line-height: 1.1em; font-weight: 600; color: <?php echo esc_attr( $search_color ); ?>; margin-left: 5px;"> |
| 125 | 130 | <?php echo esc_html( $percentage_total_search ); ?>% |
| 126 | 131 | </span> |
| @@ -140,9 +145,9 @@ | ||
| 140 | 145 | <h3 style="font-size: 12px; line-height: 1em; color: #6e6e73; font-weight: 600; text-transform: uppercase; padding-bottom: 5px; margin: 0;"><?php esc_html_e( 'Total Reactions', 'betterdocs' ); ?></h3> |
| 141 | 146 | <h2 style="font-size: 22px; line-height: 1em; font-weight: 700; color: #1d1d1f; margin: 0;"> |
| 142 | 147 | <?php |
| 143 | 148 | echo esc_html( $reactions ); |
| 144 | - echo $reactions_arrow; | |
| 149 | + echo wp_kses_post( $reactions_arrow ); | |
| 145 | 150 | ?> |
| 146 | 151 | <span style="font-size: 14px; line-height: 1.1em; font-weight: 600; color: <?php echo esc_attr( $reactions_color ); ?>; margin-left: 5px;"> |
| 147 | 152 | <?php echo esc_html( $percentage_reactions ); ?>% |
| 148 | 153 | </span> |
| @@ -161,9 +166,9 @@ | ||
| 161 | 166 | <h2 |
| 162 | 167 | style="font-size: 22px; line-height: 1em; font-weight: 700; color: #1d1d1f; margin: 0;"> |
| 163 | 168 | <?php |
| 164 | 169 | echo esc_html( $total_docs ); |
| 165 | - echo $docs_arrow; | |
| 170 | + echo wp_kses_post( $docs_arrow ); | |
| 166 | 171 | ?> |
| 167 | 172 | <span style="font-size: 14px; line-height: 1.1em; font-weight: 600; color: <?php echo esc_attr( $docs_color ); ?>; margin-left: 5px;"> |
| 168 | 173 | <?php echo esc_html( $percentage_total_docs ); ?>% |
| 169 | 174 | </span> |