Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 07:54:21 PM (16 years ago)
Author:
apeatling
Message:

Merging 1.1 branch changes and syncing.

File:
1 edited

Legend:

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

    r2070 r2077  
    44 *
    55 * This file contains functions that are deprecated.
    6  * You should not under any circumstance use these functions as they are 
     6 * You should not under any circumstance use these functions as they are
    77 * either no longer valid, or have been replaced with something much more awesome.
    88 *
     
    1313 * Of course, things will still work if you use these functions but you will
    1414 * be the laughing stock of the BuddyPress community. We will all point and laugh at
    15  * you. You'll also be making things harder for yourself in the long run, 
     15 * you. You'll also be making things harder for yourself in the long run,
    1616 * and you will miss out on lovely performance and functionality improvements.
    17  * 
     17 *
    1818 * If you've checked you are not using any deprecated functions and finished your little
    1919 * dance, you can add the following line to your wp-config.php file to prevent any of
     
    2525function bp_core_deprecated_globals() {
    2626    global $bp;
    27    
     27
    2828    /* If we are using a BuddyPress 1.1+ theme ignore this. */
    2929    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
     
    6565function bp_core_signup_show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
    6666    global $current_site;
    67    
     67
    6868    ?>
    6969    <h3><?php _e( 'Blog Details', 'buddypress' ) ?></h3>
     
    7171        <?php _e( "To register your first blog, just fill in the details below and your registration is complete.", 'buddypress' ) ?>
    7272    </p>
    73    
     73
    7474    <div id="blog-details-fields">
    7575        <?php
    76    
     76
    7777        // Blog name
    7878        if ( 'no' == constant( "VHOST" ) )
     
    9090            echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
    9191        }
    92        
     92
    9393        if ( !is_user_logged_in() ) {
    9494            echo '<p class="help-text">';
     
    105105        // Blog Title
    106106        ?>
    107         <label for="blog_title"><?php _e( 'Blog Title:', 'buddypress' ) ?></label> 
     107        <label for="blog_title"><?php _e( 'Blog Title:', 'buddypress' ) ?></label>
    108108        <?php if ( $errmsg = $errors->get_error_message('blog_title') ) { ?>
    109109            <p class="error"><?php echo $errmsg ?></p>
     
    114114        <p>
    115115            <label for="blog_public_on"><?php _e( 'Privacy:', 'buddypress' ) ?></label>
    116             <?php _e( 'I would like my blog to appear in search engines like Google and Technorati, and in public listings around this site.', 'buddypress' ); ?> 
     116            <?php _e( 'I would like my blog to appear in search engines like Google and Technorati, and in public listings around this site.', 'buddypress' ); ?>
    117117            <label class="checkbox" for="blog_public_on">
    118118                <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if( !isset( $_POST['blog_public'] ) || '1' == $_POST['blog_public'] ) { ?>checked="checked"<?php } ?> />
     
    153153    <?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?>
    154154        <p class="error"><?php echo $errmsg ?></p>
    155     <?php } ?>     
     155    <?php } ?>
    156156    <input name="user_email" type="text" id="user_email" value="<?php  echo wp_specialchars($user_email, 1) ?>" maxlength="200" /><p class="help-text"><?php _e( '(We&#8217;ll send your password to this address, so <strong>triple-check it</strong>.)', 'buddypress' ) ?></p>
    157157    <?php
     
    160160    }
    161161    echo '</div>';
    162    
     162
    163163    echo '<div id="extra-fields">';
    164164    do_action( 'signup_extra_fields', $errors );
     
    172172function bp_core_signup_signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
    173173    global $current_user, $current_site;
    174    
     174
    175175    if ( ! is_wp_error($errors) ) {
    176176        $errors = new WP_Error();
     
    186186    <h3><?php _e( "You're already registered!", 'buddypress' )?></h3>
    187187    <p><?php _e( 'You can still create another blog however. Fill in the form below to add another blog to your account.', 'buddypress' ) ?>
    188      
     188
    189189
    190190    <p><?php _e( "There is no limit to the number of blogs you can have, so create to your heart's content, but blog responsibly. If you&#8217;re not going to use a great blog domain, leave it for a new user. Now have at it!", 'buddypress' ) ?></p>
    191    
     191
    192192    <form id="setupform" method="post" action="<?php echo site_url(BP_REGISTER_SLUG) ?>">
    193193        <input type="hidden" name="stage" value="gimmeanotherblog" />
     
    254254
    255255    ?>
    256    
     256
    257257    <form id="setupform" method="post" action="<?php echo site_url(BP_REGISTER_SLUG) ?>">
    258258        <p id="intro-text"><?php _e( 'Registering for a new account is easy, just fill in the form below and you\'ll be a new member in no time at all.', 'buddypress' ) ?></p>
    259259        <input type="hidden" name="stage" value="validate-user-signup" />
    260260        <?php do_action( "signup_hidden_fields" ); ?>
    261        
     261
    262262        <?php bp_core_signup_show_user_form($user_name, $user_email, $errors); ?>
    263        
     263
    264264        <?php if( 'blog' == $active_signup ) { ?>
    265265            <input id="signupblog" type="hidden" name="signup_for" value="blog" />
     
    270270                <h3><?php _e( 'Create a Blog?', 'buddypress' ) ?></h3>
    271271                <p id="blog-help-text"><?php _e( 'If you want to create your first blog, select the option below and you\'ll be asked for a few more details.', 'buddypress' ) ?></p>
    272                
     272
    273273                <div id="blog-or-username-fields">
    274274                    <p>
    275275                        <input id="signupblog" type="radio" name="signup_for" value="blog" <?php echo $signup['blog'] ?> />
    276                         <label class="checkbox" for="signupblog"><?php _e( 'Gimme a blog!', 'buddypress' ) ?></label>           
     276                        <label class="checkbox" for="signupblog"><?php _e( 'Gimme a blog!', 'buddypress' ) ?></label>
    277277                    </p>
    278                
     278
    279279                    <p>
    280                         <input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup['user'] ?> />         
     280                        <input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup['user'] ?> />
    281281                        <label class="checkbox" for="signupuser"><?php _e( 'Just a username, please.', 'buddypress' ) ?></label>
    282282                    </p>
     
    378378    ?>
    379379    <h3><?php _e('Congratulations, You are now registered!', 'buddypress' ) ?></h3>
    380    
     380
    381381    <p><?php printf( __('But, before you can start using your blog, <strong>you must activate it</strong>. Check your inbox at <strong>%s</strong> and click the link given. It should arrive within 30 minutes.', 'buddypress' ),  $user_email) ?></p>
    382382    <p>&nbsp;</p>
    383    
     383
    384384    <h3><?php _e( 'Still waiting for your email?', 'buddypress' ); ?></h3>
    385385    <p>
     
    465465function bp_core_activation_set_headers() {
    466466    global $wp_object_cache;
    467    
     467
    468468    define( "WP_INSTALLING", true );
    469    
     469
    470470    require_once( ABSPATH . WPINC . '/registration.php');
    471    
     471
    472472    if( is_object( $wp_object_cache ) )
    473473        $wp_object_cache->cache_enabled = false;
    474        
     474
    475475    do_action("activate_header");
    476476}
     
    478478function bp_core_activation_do_activation() {
    479479    global $current_site, $blog_id, $user_id; ?>
    480    
     480
    481481    <?php if ( empty( $_GET['key'] ) && empty( $_POST['key'] ) ) { ?>
    482482
    483483        <h3><?php _e( 'Activation Key Required', 'buddypress' ) ?></h3>
    484        
     484
    485485        <p id="intro-text"><?php _e( 'This is the key contained in the email you were sent after registering for this site.', 'buddypress' ) ?></p>
    486            
     486
    487487        <div class="field-box">
    488488            <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php">
     
    496496            </form>
    497497        </div>
    498        
     498
    499499    <?php } else {
    500500
    501501        $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
    502502        $result = wpmu_activate_signup($key);
    503                
     503
    504504        if ( is_wp_error($result) ) {
    505505            if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
    506506                $signup = $result->get_error_data();
    507507                ?>
    508                
     508
    509509                <h3><?php _e('Your account is now active!', 'buddypress' ); ?></h3>
    510                
     510
    511511                <?php
    512512                _e( 'Your account has already been activated. You can now log in with the account details that were emailed to you.' );
    513            
     513
    514514            } else {
    515515                ?>
     
    522522
    523523            $user = new WP_User( (int) $user_id);
    524            
     524
    525525            ?>
    526            
     526
    527527            <h3><?php _e('Your account is now active!', 'buddypress' ); ?></h3>
    528            
     528
    529529            <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.', 'buddypress' ), site_url( 'wp-login.php?redirect_to=' . site_url() ), site_url() ); ?></p>
    530            
     530
    531531            <div class="field-box" id="signup-welcome">
    532532                <p><span class="label"><?php _e( 'Username:', 'buddypress' ); ?></span> <?php echo $user->user_login ?></p>
    533533                <p><span class="label"><?php _e( 'Password:', 'buddypress' ); ?></span> <?php echo $password; ?></p>
    534534            </div>
    535            
    536             <?php 
     535
     536            <?php
    537537            do_action( 'bp_activation_extras', $user_id, $meta );
    538538        }
     
    550550        $activate_url = bp_activation_page( false ) ."?key=$key";
    551551    }
    552    
     552
    553553    $activate_url = clean_url($activate_url);
    554554    $admin_email = get_site_option( "admin_email" );
    555    
     555
    556556    if ( empty( $admin_email ) )
    557557        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    558    
     558
    559559    $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) );
    560560    $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    561561    $message = sprintf(__("To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your blog here:\n\n%s", 'buddypress' ), $activate_url, clean_url("http://{$domain}{$path}" ) );
    562562    $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), clean_url('http://' . $domain . $path));
    563    
     563
    564564    wp_mail($user_email, $subject, $message, $message_headers);
    565    
     565
    566566    // Return false to stop the original WPMU function from continuing
    567567    return false;
     
    574574    // Send email with activation link.
    575575    $admin_email = get_site_option( "admin_email" );
    576    
     576
    577577    if ( empty( $admin_email ) )
    578578        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    579    
     579
    580580    $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) );
    581581    $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    582582    $message = apply_filters( 'wpmu_signup_user_notification_email', sprintf( __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n", 'buddypress' ), clean_url( bp_activation_page( false ) . "?key=$key" ) ) );
    583     $subject = apply_filters( 'wpmu_signup_user_notification_subject', sprintf( __(  'Activate %s', 'buddypress' ), $user ) ); 
     583    $subject = apply_filters( 'wpmu_signup_user_notification_subject', sprintf( __(  'Activate %s', 'buddypress' ), $user ) );
    584584
    585585    wp_mail( $user_email, $subject, $message, $message_headers );
    586    
     586
    587587    // Return false to stop the original WPMU function from continuing
    588588    return false;
     
    632632function bp_loggedinuser_avatar( $width = false, $height = false ) {
    633633    global $bp;
    634    
     634
    635635    echo apply_filters( 'bp_loggedinuser_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => 'thumb', 'width' => $width, 'height' => $height ) ) );
    636636}
     
    639639function bp_loggedinuser_avatar_thumbnail( $width = false, $height = false ) {
    640640    global $bp;
    641    
     641
    642642    echo apply_filters( 'bp_get_options_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'type' => 'thumb', 'width' => $width, 'height' => $height ) ) );
    643643}
     
    667667    <p><?php _e('Your avatar will be used on your profile and throughout the site.', 'buddypress') ?></p>
    668668    <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Photo\' to proceed.', 'buddypress' ) ?></p>
    669    
    670     <form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data">   
     669
     670    <form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data">
    671671
    672672    <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
    673    
     673
    674674        <h3><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h3>
    675675
    676676        <?php bp_displayed_user_avatar( 'type=full') ?>
    677677        <?php bp_displayed_user_avatar( 'type=thumb' ) ?>
    678    
     678
    679679        <p>
    680             <input type="file" name="file" id="file" /> 
     680            <input type="file" name="file" id="file" />
    681681            <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />
    682682            <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
     
    684684
    685685        <?php wp_nonce_field( 'bp_avatar_upload' ) ?>
    686        
     686
    687687    <?php endif; ?>
    688    
     688
    689689    <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
    690    
     690
    691691        <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3>
    692        
     692
    693693        <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" />
    694        
     694
    695695        <div id="avatar-crop-pane" style="width:100px;height:100px;overflow:hidden;">
    696696            <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" />
     
    698698
    699699        <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />
    700        
     700
    701701        <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />
    702702        <input type="hidden" id="x" name="x" />
     
    706706
    707707        <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?>
    708        
     708
    709709    <?php endif; ?>
    710    
     710
    711711    </form> <?php
    712712}
     
    714714function bp_core_handle_avatar_upload($file) {
    715715    global $wp_upload_error;
    716    
     716
    717717    require_once( ABSPATH . '/wp-admin/includes/file.php' );
    718    
     718
    719719    // Change the upload file location to /avatars/user_id
    720720    add_filter( 'upload_dir', 'xprofile_avatar_upload_dir' );
     
    757757function bp_core_get_buddypress_themes() {
    758758    global $wp_themes;
    759    
     759
    760760    /* If we are using a BuddyPress 1.1+ theme ignore this. */
    761761    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    762762        return false;
    763    
     763
    764764    /* Remove the cached WP themes first */
    765765    $wp_existing_themes = &$wp_themes;
    766766    $wp_themes = null;
    767    
     767
    768768    add_filter( 'theme_root', 'bp_core_filter_buddypress_theme_root' );
    769769    $themes = get_themes();
    770    
     770
    771771    if ( $themes ) {
    772772        foreach ( $themes as $name => $values ) {
    773773            if ( $name == 'BuddyPress Default Home Theme' )
    774774                continue;
    775            
     775
    776776            $member_themes[] = array(
    777777                'name' => $name,
     
    781781        }
    782782    }
    783    
     783
    784784    /* Restore the cached WP themes */
    785785    $wp_themes = $wp_existing_themes;
    786    
     786
    787787    return $member_themes;
    788788}
     
    807807function bp_core_force_buddypress_theme( $template ) {
    808808    global $is_member_page, $bp;
    809    
     809
    810810    /* If we are using a BuddyPress 1.1+ theme ignore this. */
    811811    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    812812        return $template;
    813        
     813
    814814    if ( $is_member_page ) {
    815815        $member_theme = get_site_option( 'active-member-theme' );
    816    
     816
    817817        if ( empty( $member_theme ) )
    818818            $member_theme = 'bpmember';
     
    830830function bp_core_force_buddypress_stylesheet( $stylesheet ) {
    831831    global $is_member_page;
    832    
     832
    833833    /* If we are using a BuddyPress 1.1+ theme ignore this. */
    834834    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
     
    836836
    837837    $member_theme = get_site_option( 'active-member-theme' );
    838    
     838
    839839    if ( empty( $member_theme ) )
    840840        $member_theme = 'bpmember';
     
    859859
    860860    /* Enqueue the structure CSS file to give basic positional formatting for components */
    861     wp_enqueue_style( 'bp-core-structure', BP_PLUGIN_URL . '/bp-core/deprecated/css/structure.css' );   
     861    wp_enqueue_style( 'bp-core-structure', BP_PLUGIN_URL . '/bp-core/deprecated/css/structure.css' );
    862862}
    863863add_action( 'bp_styles', 'bp_core_add_structure_css' );
     
    868868    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    869869        return false;
    870    
     870
    871871    // Enable a sitewide CSS file that will apply styles to both the home blog theme
    872872    // and the member theme.
    873873    if ( file_exists( WP_CONTENT_DIR . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'stylesheet' ) . '/css/site-wide.css' ) )
    874874        wp_enqueue_style( 'site-wide-styles', WP_CONTENT_URL . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'stylesheet' ) . '/css/site-wide.css' );
    875    
     875
    876876    wp_print_styles();
    877877}
     
    886886    if ( defined( 'BP_DISABLE_ADMIN_BAR') )
    887887        return false;
    888        
     888
    889889    if ( is_user_logged_in() || ( !(int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) {
    890890        wp_enqueue_style( 'bp-admin-bar', apply_filters( 'bp_core_admin_bar_css', BP_PLUGIN_URL . '/bp-core/deprecated/css/admin-bar.css' ) );
    891        
     891
    892892        if ( 'rtl' == get_bloginfo('text_direction') && file_exists( BP_PLUGIN_DIR . '/bp-core/deprecated/css/admin-bar-rtl.css' ) )
    893             wp_enqueue_style( 'bp-admin-bar-rtl', BP_PLUGIN_URL . '/bp-core/deprecated/css/admin-bar-rtl.css' );   
     893            wp_enqueue_style( 'bp-admin-bar-rtl', BP_PLUGIN_URL . '/bp-core/deprecated/css/admin-bar-rtl.css' );
    894894    }
    895895}
     
    902902    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    903903        return $template;
    904    
     904
    905905    wp_enqueue_script( 'jquery' );
    906906    wp_enqueue_script( 'jquery-livequery-pack', BP_PLUGIN_URL . '/bp-core/deprecated/js/jquery/jquery.livequery.pack.js', 'jquery' );
     
    914914    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    915915        return $template;
    916            
     916
    917917    wp_enqueue_script( 'bp-core-directory-members', BP_PLUGIN_URL . '/bp-core/deprecated/js/directory-members.js', array( 'jquery', 'jquery-livequery-pack' ) );
    918918}
    919 add_action( 'bp_core_action_directory_members', 'bp_core_directory_members_js' ); 
     919add_action( 'bp_core_action_directory_members', 'bp_core_directory_members_js' );
    920920
    921921/*** END DEPRECATED OLD BUDDYPRESS THEME SUPPORT ************/
     
    925925    if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) )
    926926        return false;
    927        
     927
    928928    check_ajax_referer('directory_members');
    929    
     929
    930930    locate_template( array( 'directories/members/members-loop.php' ), true );
    931931}
     
    935935function bp_login_bar() {
    936936    global $bp;
    937    
     937
    938938    if ( !is_user_logged_in() ) : ?>
    939        
     939
    940940        <form name="login-form" id="login-form" action="<?php echo $bp->root_domain . '/wp-login.php' ?>" method="post">
    941941            <input type="text" name="log" id="user_login" value="<?php _e( 'Username', 'buddypress' ) ?>" onfocus="if (this.value == '<?php _e( 'Username', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', 'buddypress' ) ?>';}" />
    942942            <input type="password" name="pwd" id="user_pass" class="input" value="" />
    943            
     943
    944944            <input type="checkbox" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', 'buddypress' ) ?>" />
    945            
    946             <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>               
     945
     946            <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>
    947947            <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />
    948948
    949949            <input type="hidden" name="redirect_to" value="http://<?php echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>" />
    950950            <input type="hidden" name="testcookie" value="1" />
    951                        
     951
    952952            <?php do_action( 'bp_login_bar_logged_out' ) ?>
    953953        </form>
    954    
     954
    955955    <?php else : ?>
    956        
     956
    957957        <div id="logout-link">
    958958            <?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?> &nbsp;
    959959            <?php bp_loggedinuser_link() ?>
    960             <?php 
     960            <?php
    961961                if ( function_exists('wp_logout_url') ) {
    962962                    $logout_link = '/ <a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    963963                } else {
    964                     $logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';                   
    965                 }           
    966                
     964                    $logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
     965                }
     966
    967967                echo apply_filters( 'bp_logout_link', $logout_link );
    968968            ?>
    969            
     969
    970970            <?php do_action( 'bp_login_bar_logged_in' ) ?>
    971971        </div>
    972        
     972
    973973    <?php endif;
    974974}
     
    977977function bp_core_add_nav_default( $parent_id, $function, $slug = false, $user_has_access = true, $admin_only = false ) {
    978978    global $bp;
    979    
     979
    980980    if ( !$user_has_access && !bp_is_home() )
    981981        return false;
    982        
     982
    983983    if ( $admin_only && !is_site_admin() )
    984984        return false;
     
    988988            add_action( 'wp', $function, 3 );
    989989        }
    990        
     990
    991991        if ( $slug )
    992992            $bp->current_action = $slug;
     
    997997function bp_get_userbar( $hide_on_directory = true ) {
    998998    global $bp;
    999    
     999
    10001000    if ( $hide_on_directory && $bp->is_directory )
    10011001        return false;
    1002    
     1002
    10031003    load_template( TEMPLATEPATH . '/userbar.php' );
    10041004}
     
    10071007function bp_get_optionsbar( $hide_on_directory = true ) {
    10081008    global $bp;
    1009    
     1009
    10101010    if ( $hide_on_directory && $bp->is_directory )
    10111011        return false;
    1012        
     1012
    10131013    load_template( TEMPLATEPATH . '/optionsbar.php' );
    10141014}
Note: See TracChangeset for help on using the changeset viewer.