Changeset 3160 for branches/1.2/bp-core/bp-core-wpabstraction.php
- Timestamp:
- 08/09/2010 07:49:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core/bp-core-wpabstraction.php
r3117 r3160 23 23 24 24 return true; 25 } 26 27 /** 28 * bp_core_is_main_site 29 * 30 * Checks if current blog is root blog of site 31 * 32 * @since 1,2,6 33 * @package BuddyPress 34 * 35 * @param int $blog_id optional blog id to test (default current blog) 36 * @return bool True if not multisite or $blog_id is main site 37 */ 38 function bp_core_is_main_site( $blog_id = '' ) { 39 global $current_site, $current_blog; 40 41 if ( !bp_core_is_multisite() ) 42 return true; 43 44 if ( empty( $blog_id ) ) 45 $blog_id = $current_blog->blog_id; 46 47 return $blog_id == $current_site->blog_id; 25 48 } 26 49
Note: See TracChangeset
for help on using the changeset viewer.