| @@ -15,12 +15,13 @@ | ||
| 15 | 15 | <nav class="my-account-navigation"> |
| 16 | 16 | |
| 17 | 17 | <ul> |
| 18 | 18 | <?php |
| 19 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone. | |
| 19 | 20 | $i = 0; |
| 20 | 21 | foreach ( $pages as $id => $page ) |
| 21 | 22 | { |
| 22 | - echo '<li class="my-account-navigation-' . esc_attr($id) . '' . ( ( $i == 0 ) ? ' active' : '' ) . '"><a href="' . ( ( isset($page['href']) ) ? $page['href'] : '#my-account-' . esc_attr($id) ) . '">' . esc_html($page['name']) . '</a></li>'; | |
| 23 | + echo '<li class="my-account-navigation-' . esc_attr($id) . '' . ( ( $i == 0 ) ? ' active' : '' ) . '"><a href="' . ( ( isset($page['href']) ) ? esc_url( $page['href'] ) : '#my-account-' . esc_attr($id) ) . '">' . esc_html($page['name']) . '</a></li>'; | |
| 23 | 24 | |
| 24 | 25 | ++$i; |
| 25 | 26 | } |
| 26 | 27 | ?> |