Changeset 7218
- Timestamp:
- 05/23/2018 09:27:18 AM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php
r7073 r7218 197 197 */ 198 198 require_once get_stylesheet_directory() . '/inc/page-meta-descriptions.php'; 199 200 /** 201 * Include reCAPTCHA functions for privacy requests. 202 */ 203 include __DIR__ . '/inc/recaptcha.php'; 204 205 /** 206 * Include the Privacy request functions. 207 */ 208 include __DIR__ . '/inc/privacy-functions.php'; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/header-child-page.php
r6797 r7218 29 29 <ul> 30 30 <?php 31 $active_item = false; 32 // The last found menu item that patches is the one that's shown as active. 33 foreach ( $menu_items as $path => $text ) { 34 if ( false !== strpos( $_SERVER['REQUEST_URI'], $path ) ) { 35 $active_item = $path; 36 } 37 } 38 31 39 foreach ( $menu_items as $path => $text ) : 32 $class = false !== strpos( $_SERVER['REQUEST_URI'], $path) ? 'active' : ''; // phpcs:ignore40 $class = ( $path === $active_item ) ? 'active' : ''; // phpcs:ignore 33 41 ?> 34 <li class="page_item"><a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( home_url( $path) ); ?>"><?php echo esc_html( $text ); ?></a></li>42 <li class="page_item"><a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( trailingslashit( home_url( $path ) ) ); ?>"><?php echo esc_html( $text ); ?></a></li> 35 43 <?php endforeach; ?> 36 44 </ul>
Note: See TracChangeset
for help on using the changeset viewer.