| @@ -1,35 +1,43 @@ | ||
| 1 | 1 | <?php |
| 2 | - if ( empty( $keywords ) || ! is_array( $keywords ) ) { | |
| 3 | - return; | |
| 4 | - } | |
| 2 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical. | |
| 3 | + | |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | + exit; | |
| 6 | +} | |
| 7 | +if ( empty( $keywords ) || ! is_array( $keywords ) ) { | |
| 8 | + return; | |
| 9 | +} | |
| 5 | 10 | ?> |
| 6 | 11 | |
| 7 | 12 | <tr> |
| 8 | - <td style="text-align: left; font-size: 20px; padding-top: 40px;"> | |
| 9 | - <?php _e( 'Most Searched Keywords', 'betterdocs' );?> | |
| 10 | - </td> | |
| 13 | + <td style="text-align: left; font-size: 20px; padding-top: 40px;"> | |
| 14 | + <?php esc_html_e( 'Most Searched Keywords', 'betterdocs' ); ?> | |
| 15 | + </td> | |
| 11 | 16 | </tr> |
| 12 | 17 | <tr> |
| 13 | - <td> | |
| 14 | - <table style="width: 100%; border-collapse: separate; border-spacing: 2px; padding-top: 20px;"> | |
| 15 | - <tr style="background: #fff;"> | |
| 16 | - <th style="text-align: left; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px; width: 50%;"> | |
| 17 | - <?php _e( 'Search Keyword', 'betterdocs' );?> | |
| 18 | - </th> | |
| 19 | - <th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px"> | |
| 20 | - <?php _e( 'Total Search', 'betterdocs' );?> | |
| 21 | - </th> | |
| 22 | - <th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px"> | |
| 23 | - <?php _e( 'Result Found', 'betterdocs' );?> | |
| 24 | - </th> | |
| 25 | - </tr> | |
| 26 | - <?php | |
| 27 | - foreach ( $keywords as $keyword ) { | |
| 28 | - betterdocs()->views->get( 'admin/email/analytics/parts/single-keyword', [ | |
| 29 | - 'keyword' => $keyword | |
| 30 | - ] ); | |
| 31 | - } | |
| 32 | - ?> | |
| 33 | - </table> | |
| 34 | - </td> | |
| 18 | + <td> | |
| 19 | + <table style="width: 100%; border-collapse: separate; border-spacing: 2px; padding-top: 20px;"> | |
| 20 | + <tr style="background: #fff;"> | |
| 21 | + <th style="text-align: left; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px; width: 50%;"> | |
| 22 | + <?php esc_html_e( 'Search Keyword', 'betterdocs' ); ?> | |
| 23 | + </th> | |
| 24 | + <th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px"> | |
| 25 | + <?php esc_html_e( 'Total Search', 'betterdocs' ); ?> | |
| 26 | + </th> | |
| 27 | + <th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px"> | |
| 28 | + <?php esc_html_e( 'Result Found', 'betterdocs' ); ?> | |
| 29 | + </th> | |
| 30 | + </tr> | |
| 31 | + <?php | |
| 32 | + foreach ( $keywords as $keyword ) { | |
| 33 | + betterdocs()->views->get( | |
| 34 | + 'admin/email/analytics/parts/single-keyword', | |
| 35 | + [ | |
| 36 | + 'keyword' => $keyword | |
| 37 | + ] | |
| 38 | + ); | |
| 39 | + } | |
| 40 | + ?> | |
| 41 | + </table> | |
| 42 | + </td> | |
| 35 | 43 | </tr> |