Changeset 3186 for branches/1.2/bp-core.php
- Timestamp:
- 08/12/2010 06:33:05 AM (16 years ago)
- File:
-
- 1 edited
-
branches/1.2/bp-core.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core.php
r3185 r3186 85 85 */ 86 86 function bp_core_setup_globals() { 87 global $bp , $wpdb;87 global $bp; 88 88 global $current_user, $current_component, $current_action, $current_blog; 89 89 global $displayed_user_id; … … 91 91 92 92 $current_user = wp_get_current_user(); 93 94 /* Get the base database prefix */ 95 $bp->table_prefix = bp_core_get_table_prefix(); 93 96 94 97 /* The domain for the root of the site where the main blog resides */ … … 154 157 155 158 /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */ 156 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['user-avatar-default'] );159 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['user-avatar-default'] ); 157 160 $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', 'identicon' ); 158 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' );161 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' ); 159 162 160 163 /* Fetch the full name for the logged in and current user */ 161 $bp->loggedin_user->fullname = bp_core_get_user_displayname( $bp->loggedin_user->id );164 $bp->loggedin_user->fullname = bp_core_get_user_displayname( $bp->loggedin_user->id ); 162 165 $bp->displayed_user->fullname = bp_core_get_user_displayname( $bp->displayed_user->id ); 163 166 … … 171 174 $bp->is_item_mod = false; 172 175 173 $bp->core->table_name_notifications = $ wpdb->base_prefix . 'bp_notifications';176 $bp->core->table_name_notifications = $bp->table_prefix . 'bp_notifications'; 174 177 175 178 if ( !$bp->current_component && $bp->displayed_user->id ) … … 199 202 add_action( 'bp_setup_root_components', 'bp_core_setup_root_uris' ); 200 203 204 /** 205 * bp_core_get_table_prefix() 206 * 207 * Allow filtering of database prefix. Intended for use in multinetwork installations. 208 * 209 * @global object $wpdb WordPress database object 210 * @return string Filtered database prefix 211 */ 212 function bp_core_get_table_prefix() { 213 global $wpdb; 214 215 return apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix ); 216 } 201 217 202 218 /** … … 252 268 * @package BuddyPress Core 253 269 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 254 * @global $wpdb WordPress DB access object.255 270 * @global $current_user WordPress global variable containing current logged in user information 256 271 * @uses is_site_admin() returns true if the current user is a site admin, false if not … … 259 274 */ 260 275 function bp_core_check_installed() { 261 global $ wpdb, $bp;276 global $bp; 262 277 263 278 if ( !is_site_admin() ) … … 279 294 * @package BuddyPress Core 280 295 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 281 * @global $wpdb WordPress DB access object.282 296 * @uses is_site_admin() returns true if the current user is a site admin, false if not 283 297 * @uses add_submenu_page() WP function to add a submenu item … … 934 948 * @package BuddyPress Core 935 949 * @param $username str Username to check. 936 * @global $wpdb WordPress DB access object.937 950 * @return false on no match 938 951 * @return int the user ID of the matched user. … … 976 989 * @package BuddyPress Core 977 990 * @param $username str Username to check. 978 * @global $wpdb WordPress DB access object.979 991 * @return false on no match 980 992 * @return int the user ID of the matched user. 981 993 */ 982 994 function bp_core_get_random_member() { 983 global $bp , $wpdb;995 global $bp; 984 996 985 997 if ( isset( $_GET['random-member'] ) ) { … … 1709 1721 */ 1710 1722 function bp_core_delete_account( $user_id = false ) { 1711 global $bp, $wp db, $wp_version;1723 global $bp, $wp_version; 1712 1724 1713 1725 if ( !$user_id ) … … 1843 1855 */ 1844 1856 function bp_core_print_generation_time() { 1845 global $wpdb; 1846 ?> 1857 ?> 1847 1858 1848 1859 <!-- Generated in <?php timer_stop(1); ?> seconds. -->
Note: See TracChangeset
for help on using the changeset viewer.