Making WordPress.org

Changeset 7218


Ignore:
Timestamp:
05/23/2018 09:27:18 AM (7 years ago)
Author:
dd32
Message:

Main: Add two new page templates for Data Export and Data Erasure requests.
These pages and forms are currently disabled for non-privledged accounts and not available.

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  
    197197 */
    198198require_once get_stylesheet_directory() . '/inc/page-meta-descriptions.php';
     199
     200/**
     201 * Include reCAPTCHA functions for privacy requests.
     202 */
     203include __DIR__ . '/inc/recaptcha.php';
     204
     205/**
     206 * Include the Privacy request functions.
     207 */
     208include __DIR__ . '/inc/privacy-functions.php';
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/header-child-page.php

    r6797 r7218  
    2929                        <ul>
    3030                            <?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
    3139                            foreach ( $menu_items as $path => $text ) :
    32                                 $class = false !== strpos( $_SERVER['REQUEST_URI'], $path ) ? 'active' : ''; // phpcs:ignore
     40                                $class = ( $path === $active_item ) ? 'active' : ''; // phpcs:ignore
    3341                                ?>
    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>
    3543                            <?php endforeach; ?>
    3644                        </ul>
Note: See TracChangeset for help on using the changeset viewer.