Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/09/2009 04:52:43 AM (17 years ago)
Author:
apeatling
Message:

Added filters and actions around avatars and logins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r1175 r1176  
    498498            <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>               
    499499            <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
    500            
    501             <?php do_action( 'bp_login_bar_logged_out' ) ?>
    502500
    503501            <input type="hidden" name="redirect_to" value="http://<?php echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>" />
    504502            <input type="hidden" name="testcookie" value="1" />
     503                       
     504            <?php do_action( 'bp_login_bar_logged_out' ) ?>
    505505        </form>
    506506   
     
    509509        <div id="logout-link">
    510510            <?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?> &nbsp;
    511             <?php bp_loggedinuser_link() ?>
    512             <?php if ( function_exists('wp_logout_url') ) : ?>
    513                 / <a href="<?php echo wp_logout_url( site_url() ) ?>" alt="<?php _e( 'Log Out', 'buddypress' ) ?>"><?php _e( 'Log Out', 'buddypress' ) ?></a>           
    514             <?php else : ?>
    515                 / <a href="<?php echo site_url( '/wp-login.php?action=logout&amp;redirect_to=' . site_url() ) ?>"><?php _e( 'Log Out', 'buddypress' ) ?></a>
    516             <?php endif; ?>
    517 
     511            <?php bp_loggedinuser_link() ?>
     512            <?php
     513                if ( function_exists('wp_logout_url') ) {
     514                    $logout_link = '/ <a href="' . wp_logout_url( site_url() ) . '" alt="' . __( 'Log Out', 'buddypress' ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
     515                } else {
     516                    $logout_link = '/ <a href="' . site_url( '/wp-login.php?action=logout&amp;redirect_to=' . site_url() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';                 
     517                }           
     518               
     519                echo apply_filters( 'bp_logout_link', $logout_link );
     520            ?>
     521           
    518522            <?php do_action( 'bp_login_bar_logged_in' ) ?>
    519523        </div>
Note: See TracChangeset for help on using the changeset viewer.