Changeset 2077 for trunk/bp-core/deprecated/bp-core-deprecated.php
- Timestamp:
- 11/02/2009 07:54:21 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/deprecated/bp-core-deprecated.php (modified) (44 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/deprecated/bp-core-deprecated.php
r2070 r2077 4 4 * 5 5 * 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 7 7 * either no longer valid, or have been replaced with something much more awesome. 8 8 * … … 13 13 * Of course, things will still work if you use these functions but you will 14 14 * 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, 16 16 * and you will miss out on lovely performance and functionality improvements. 17 * 17 * 18 18 * If you've checked you are not using any deprecated functions and finished your little 19 19 * dance, you can add the following line to your wp-config.php file to prevent any of … … 25 25 function bp_core_deprecated_globals() { 26 26 global $bp; 27 27 28 28 /* If we are using a BuddyPress 1.1+ theme ignore this. */ 29 29 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) … … 65 65 function bp_core_signup_show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) { 66 66 global $current_site; 67 67 68 68 ?> 69 69 <h3><?php _e( 'Blog Details', 'buddypress' ) ?></h3> … … 71 71 <?php _e( "To register your first blog, just fill in the details below and your registration is complete.", 'buddypress' ) ?> 72 72 </p> 73 73 74 74 <div id="blog-details-fields"> 75 75 <?php 76 76 77 77 // Blog name 78 78 if ( 'no' == constant( "VHOST" ) ) … … 90 90 echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />'; 91 91 } 92 92 93 93 if ( !is_user_logged_in() ) { 94 94 echo '<p class="help-text">'; … … 105 105 // Blog Title 106 106 ?> 107 <label for="blog_title"><?php _e( 'Blog Title:', 'buddypress' ) ?></label> 107 <label for="blog_title"><?php _e( 'Blog Title:', 'buddypress' ) ?></label> 108 108 <?php if ( $errmsg = $errors->get_error_message('blog_title') ) { ?> 109 109 <p class="error"><?php echo $errmsg ?></p> … … 114 114 <p> 115 115 <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' ); ?> 117 117 <label class="checkbox" for="blog_public_on"> 118 118 <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 } ?> /> … … 153 153 <?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?> 154 154 <p class="error"><?php echo $errmsg ?></p> 155 <?php } ?> 155 <?php } ?> 156 156 <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’ll send your password to this address, so <strong>triple-check it</strong>.)', 'buddypress' ) ?></p> 157 157 <?php … … 160 160 } 161 161 echo '</div>'; 162 162 163 163 echo '<div id="extra-fields">'; 164 164 do_action( 'signup_extra_fields', $errors ); … … 172 172 function bp_core_signup_signup_another_blog($blogname = '', $blog_title = '', $errors = '') { 173 173 global $current_user, $current_site; 174 174 175 175 if ( ! is_wp_error($errors) ) { 176 176 $errors = new WP_Error(); … … 186 186 <h3><?php _e( "You're already registered!", 'buddypress' )?></h3> 187 187 <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 189 189 190 190 <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’re not going to use a great blog domain, leave it for a new user. Now have at it!", 'buddypress' ) ?></p> 191 191 192 192 <form id="setupform" method="post" action="<?php echo site_url(BP_REGISTER_SLUG) ?>"> 193 193 <input type="hidden" name="stage" value="gimmeanotherblog" /> … … 254 254 255 255 ?> 256 256 257 257 <form id="setupform" method="post" action="<?php echo site_url(BP_REGISTER_SLUG) ?>"> 258 258 <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> 259 259 <input type="hidden" name="stage" value="validate-user-signup" /> 260 260 <?php do_action( "signup_hidden_fields" ); ?> 261 261 262 262 <?php bp_core_signup_show_user_form($user_name, $user_email, $errors); ?> 263 263 264 264 <?php if( 'blog' == $active_signup ) { ?> 265 265 <input id="signupblog" type="hidden" name="signup_for" value="blog" /> … … 270 270 <h3><?php _e( 'Create a Blog?', 'buddypress' ) ?></h3> 271 271 <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 273 273 <div id="blog-or-username-fields"> 274 274 <p> 275 275 <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> 277 277 </p> 278 278 279 279 <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'] ?> /> 281 281 <label class="checkbox" for="signupuser"><?php _e( 'Just a username, please.', 'buddypress' ) ?></label> 282 282 </p> … … 378 378 ?> 379 379 <h3><?php _e('Congratulations, You are now registered!', 'buddypress' ) ?></h3> 380 380 381 381 <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> 382 382 <p> </p> 383 383 384 384 <h3><?php _e( 'Still waiting for your email?', 'buddypress' ); ?></h3> 385 385 <p> … … 465 465 function bp_core_activation_set_headers() { 466 466 global $wp_object_cache; 467 467 468 468 define( "WP_INSTALLING", true ); 469 469 470 470 require_once( ABSPATH . WPINC . '/registration.php'); 471 471 472 472 if( is_object( $wp_object_cache ) ) 473 473 $wp_object_cache->cache_enabled = false; 474 474 475 475 do_action("activate_header"); 476 476 } … … 478 478 function bp_core_activation_do_activation() { 479 479 global $current_site, $blog_id, $user_id; ?> 480 480 481 481 <?php if ( empty( $_GET['key'] ) && empty( $_POST['key'] ) ) { ?> 482 482 483 483 <h3><?php _e( 'Activation Key Required', 'buddypress' ) ?></h3> 484 484 485 485 <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 487 487 <div class="field-box"> 488 488 <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php"> … … 496 496 </form> 497 497 </div> 498 498 499 499 <?php } else { 500 500 501 501 $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key']; 502 502 $result = wpmu_activate_signup($key); 503 503 504 504 if ( is_wp_error($result) ) { 505 505 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { 506 506 $signup = $result->get_error_data(); 507 507 ?> 508 508 509 509 <h3><?php _e('Your account is now active!', 'buddypress' ); ?></h3> 510 510 511 511 <?php 512 512 _e( 'Your account has already been activated. You can now log in with the account details that were emailed to you.' ); 513 513 514 514 } else { 515 515 ?> … … 522 522 523 523 $user = new WP_User( (int) $user_id); 524 524 525 525 ?> 526 526 527 527 <h3><?php _e('Your account is now active!', 'buddypress' ); ?></h3> 528 528 529 529 <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 531 531 <div class="field-box" id="signup-welcome"> 532 532 <p><span class="label"><?php _e( 'Username:', 'buddypress' ); ?></span> <?php echo $user->user_login ?></p> 533 533 <p><span class="label"><?php _e( 'Password:', 'buddypress' ); ?></span> <?php echo $password; ?></p> 534 534 </div> 535 536 <?php 535 536 <?php 537 537 do_action( 'bp_activation_extras', $user_id, $meta ); 538 538 } … … 550 550 $activate_url = bp_activation_page( false ) ."?key=$key"; 551 551 } 552 552 553 553 $activate_url = clean_url($activate_url); 554 554 $admin_email = get_site_option( "admin_email" ); 555 555 556 556 if ( empty( $admin_email ) ) 557 557 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 558 558 559 559 $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) ); 560 560 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 561 561 $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}" ) ); 562 562 $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), clean_url('http://' . $domain . $path)); 563 563 564 564 wp_mail($user_email, $subject, $message, $message_headers); 565 565 566 566 // Return false to stop the original WPMU function from continuing 567 567 return false; … … 574 574 // Send email with activation link. 575 575 $admin_email = get_site_option( "admin_email" ); 576 576 577 577 if ( empty( $admin_email ) ) 578 578 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 579 579 580 580 $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) ); 581 581 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 582 582 $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 ) ); 584 584 585 585 wp_mail( $user_email, $subject, $message, $message_headers ); 586 586 587 587 // Return false to stop the original WPMU function from continuing 588 588 return false; … … 632 632 function bp_loggedinuser_avatar( $width = false, $height = false ) { 633 633 global $bp; 634 634 635 635 echo apply_filters( 'bp_loggedinuser_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => 'thumb', 'width' => $width, 'height' => $height ) ) ); 636 636 } … … 639 639 function bp_loggedinuser_avatar_thumbnail( $width = false, $height = false ) { 640 640 global $bp; 641 641 642 642 echo apply_filters( 'bp_get_options_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'type' => 'thumb', 'width' => $width, 'height' => $height ) ) ); 643 643 } … … 667 667 <p><?php _e('Your avatar will be used on your profile and throughout the site.', 'buddypress') ?></p> 668 668 <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"> 671 671 672 672 <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?> 673 673 674 674 <h3><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h3> 675 675 676 676 <?php bp_displayed_user_avatar( 'type=full') ?> 677 677 <?php bp_displayed_user_avatar( 'type=thumb' ) ?> 678 678 679 679 <p> 680 <input type="file" name="file" id="file" /> 680 <input type="file" name="file" id="file" /> 681 681 <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" /> 682 682 <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> … … 684 684 685 685 <?php wp_nonce_field( 'bp_avatar_upload' ) ?> 686 686 687 687 <?php endif; ?> 688 688 689 689 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 690 690 691 691 <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3> 692 692 693 693 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> 694 694 695 695 <div id="avatar-crop-pane" style="width:100px;height:100px;overflow:hidden;"> 696 696 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> … … 698 698 699 699 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" /> 700 700 701 701 <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" /> 702 702 <input type="hidden" id="x" name="x" /> … … 706 706 707 707 <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?> 708 708 709 709 <?php endif; ?> 710 710 711 711 </form> <?php 712 712 } … … 714 714 function bp_core_handle_avatar_upload($file) { 715 715 global $wp_upload_error; 716 716 717 717 require_once( ABSPATH . '/wp-admin/includes/file.php' ); 718 718 719 719 // Change the upload file location to /avatars/user_id 720 720 add_filter( 'upload_dir', 'xprofile_avatar_upload_dir' ); … … 757 757 function bp_core_get_buddypress_themes() { 758 758 global $wp_themes; 759 759 760 760 /* If we are using a BuddyPress 1.1+ theme ignore this. */ 761 761 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 762 762 return false; 763 763 764 764 /* Remove the cached WP themes first */ 765 765 $wp_existing_themes = &$wp_themes; 766 766 $wp_themes = null; 767 767 768 768 add_filter( 'theme_root', 'bp_core_filter_buddypress_theme_root' ); 769 769 $themes = get_themes(); 770 770 771 771 if ( $themes ) { 772 772 foreach ( $themes as $name => $values ) { 773 773 if ( $name == 'BuddyPress Default Home Theme' ) 774 774 continue; 775 775 776 776 $member_themes[] = array( 777 777 'name' => $name, … … 781 781 } 782 782 } 783 783 784 784 /* Restore the cached WP themes */ 785 785 $wp_themes = $wp_existing_themes; 786 786 787 787 return $member_themes; 788 788 } … … 807 807 function bp_core_force_buddypress_theme( $template ) { 808 808 global $is_member_page, $bp; 809 809 810 810 /* If we are using a BuddyPress 1.1+ theme ignore this. */ 811 811 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 812 812 return $template; 813 813 814 814 if ( $is_member_page ) { 815 815 $member_theme = get_site_option( 'active-member-theme' ); 816 816 817 817 if ( empty( $member_theme ) ) 818 818 $member_theme = 'bpmember'; … … 830 830 function bp_core_force_buddypress_stylesheet( $stylesheet ) { 831 831 global $is_member_page; 832 832 833 833 /* If we are using a BuddyPress 1.1+ theme ignore this. */ 834 834 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) … … 836 836 837 837 $member_theme = get_site_option( 'active-member-theme' ); 838 838 839 839 if ( empty( $member_theme ) ) 840 840 $member_theme = 'bpmember'; … … 859 859 860 860 /* 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' ); 862 862 } 863 863 add_action( 'bp_styles', 'bp_core_add_structure_css' ); … … 868 868 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 869 869 return false; 870 870 871 871 // Enable a sitewide CSS file that will apply styles to both the home blog theme 872 872 // and the member theme. 873 873 if ( file_exists( WP_CONTENT_DIR . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'stylesheet' ) . '/css/site-wide.css' ) ) 874 874 wp_enqueue_style( 'site-wide-styles', WP_CONTENT_URL . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'stylesheet' ) . '/css/site-wide.css' ); 875 875 876 876 wp_print_styles(); 877 877 } … … 886 886 if ( defined( 'BP_DISABLE_ADMIN_BAR') ) 887 887 return false; 888 888 889 889 if ( is_user_logged_in() || ( !(int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) { 890 890 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 892 892 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' ); 894 894 } 895 895 } … … 902 902 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 903 903 return $template; 904 904 905 905 wp_enqueue_script( 'jquery' ); 906 906 wp_enqueue_script( 'jquery-livequery-pack', BP_PLUGIN_URL . '/bp-core/deprecated/js/jquery/jquery.livequery.pack.js', 'jquery' ); … … 914 914 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 915 915 return $template; 916 916 917 917 wp_enqueue_script( 'bp-core-directory-members', BP_PLUGIN_URL . '/bp-core/deprecated/js/directory-members.js', array( 'jquery', 'jquery-livequery-pack' ) ); 918 918 } 919 add_action( 'bp_core_action_directory_members', 'bp_core_directory_members_js' ); 919 add_action( 'bp_core_action_directory_members', 'bp_core_directory_members_js' ); 920 920 921 921 /*** END DEPRECATED OLD BUDDYPRESS THEME SUPPORT ************/ … … 925 925 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 926 926 return false; 927 927 928 928 check_ajax_referer('directory_members'); 929 929 930 930 locate_template( array( 'directories/members/members-loop.php' ), true ); 931 931 } … … 935 935 function bp_login_bar() { 936 936 global $bp; 937 937 938 938 if ( !is_user_logged_in() ) : ?> 939 939 940 940 <form name="login-form" id="login-form" action="<?php echo $bp->root_domain . '/wp-login.php' ?>" method="post"> 941 941 <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' ) ?>';}" /> 942 942 <input type="password" name="pwd" id="user_pass" class="input" value="" /> 943 943 944 944 <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' ) ?>"/> 947 947 <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" /> 948 948 949 949 <input type="hidden" name="redirect_to" value="http://<?php echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>" /> 950 950 <input type="hidden" name="testcookie" value="1" /> 951 951 952 952 <?php do_action( 'bp_login_bar_logged_out' ) ?> 953 953 </form> 954 954 955 955 <?php else : ?> 956 956 957 957 <div id="logout-link"> 958 958 <?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?> 959 959 <?php bp_loggedinuser_link() ?> 960 <?php 960 <?php 961 961 if ( function_exists('wp_logout_url') ) { 962 962 $logout_link = '/ <a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>'; 963 963 } else { 964 $logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>'; 965 } 966 964 $logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>'; 965 } 966 967 967 echo apply_filters( 'bp_logout_link', $logout_link ); 968 968 ?> 969 969 970 970 <?php do_action( 'bp_login_bar_logged_in' ) ?> 971 971 </div> 972 972 973 973 <?php endif; 974 974 } … … 977 977 function bp_core_add_nav_default( $parent_id, $function, $slug = false, $user_has_access = true, $admin_only = false ) { 978 978 global $bp; 979 979 980 980 if ( !$user_has_access && !bp_is_home() ) 981 981 return false; 982 982 983 983 if ( $admin_only && !is_site_admin() ) 984 984 return false; … … 988 988 add_action( 'wp', $function, 3 ); 989 989 } 990 990 991 991 if ( $slug ) 992 992 $bp->current_action = $slug; … … 997 997 function bp_get_userbar( $hide_on_directory = true ) { 998 998 global $bp; 999 999 1000 1000 if ( $hide_on_directory && $bp->is_directory ) 1001 1001 return false; 1002 1002 1003 1003 load_template( TEMPLATEPATH . '/userbar.php' ); 1004 1004 } … … 1007 1007 function bp_get_optionsbar( $hide_on_directory = true ) { 1008 1008 global $bp; 1009 1009 1010 1010 if ( $hide_on_directory && $bp->is_directory ) 1011 1011 return false; 1012 1012 1013 1013 load_template( TEMPLATEPATH . '/optionsbar.php' ); 1014 1014 }
Note: See TracChangeset
for help on using the changeset viewer.