WordPress.org

Making WordPress.org

Changeset 1754


Ignore:
Timestamp:
07/19/2015 07:13:25 PM (4 years ago)
Author:
ocean90
Message:

Forums Theme: Fix Log Out URL and add some escaping.

see #1126.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/header.php

    r1753 r1754  
    33<div id="headline">
    44    <div class="wrapper">
    5         <h2><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Forums', 'wporg-forums' ); ?></a></h2>
     5        <h2><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Forums', 'wporg-forums' ); ?></a></h2>
    66        <p class="login">
    77            <?php if ( is_user_logged_in() ) : ?>
    8                 <?php echo sprintf( __( 'Howdy, %s', 'wporg-forums' ), '<a href="' . bbp_get_user_profile_url( bbp_get_current_user_id() ) . '">' . bbp_get_current_user_name() . '</a>' ); ?>
     8                <?php echo sprintf( __( 'Howdy, %s', 'wporg-forums' ), '<a href="' . esc_url( bbp_get_user_profile_url( bbp_get_current_user_id() ) ) . '">' . bbp_get_current_user_name() . '</a>' ); ?>
    99
    1010                <small>(
     
    1212                    <a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Admin', 'wporg-forums' ); ?></a> |
    1313                <?php endif; ?>
    14                     <a href="<?php bbp_logout_url(); ?>"><?php _e( 'Sign Out', 'wporg-forums' ); ?></a>
     14                    <a href="<?php echo esc_url( wp_logout_url() ); ?>"><?php _e( 'Log Out', 'wporg-forums' ); ?></a>
    1515                )</small><br>
    1616            <?php else : ?>
    1717                <?php $current_url = esc_url_raw( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); ?>
    18                 <a href="https://wordpress.org/support/bb-login.php?redirect_to=<?php echo urlencode( $current_url ); ?>"><?php _e( 'Login', 'wporg-forums' ); ?></a>
     18                <a href="https://wordpress.org/support/bb-login.php?redirect_to=<?php echo urlencode( $current_url ); ?>"><?php _e( 'Log In', 'wporg-forums' ); ?></a>
    1919            <?php endif; ?>
    2020        </p>
Note: See TracChangeset for help on using the changeset viewer.