Changeset 5309 for trunk/bp-core/bp-core-functions.php
- Timestamp:
- 11/08/2011 08:39:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r5305 r5309 1 1 <?php 2 3 /** 4 * BuddyPress Common Functions 5 * 6 * @package BuddyPress 7 * @subpackage Functions 8 */ 9 2 10 // Exit if accessed directly 3 11 if ( !defined( 'ABSPATH' ) ) exit; 12 13 /** Versions ******************************************************************/ 14 15 /** 16 * Output the BuddyPress version 17 * 18 * @since BuddyPress (1.6) 19 * @uses bp_get_version() To get the BuddyPress version 20 */ 21 function bp_version() { 22 echo bp_get_version(); 23 } 24 /** 25 * Return the BuddyPress version 26 * 27 * @since BuddyPress (1.6) 28 * @global BuddyPress $bp 29 * @retrun string The BuddyPress version 30 */ 31 function bp_get_version() { 32 global $bp; 33 return $bp->version; 34 } 35 36 /** 37 * Output the BuddyPress database version 38 * 39 * @since BuddyPress (1.6) 40 * @uses bp_get_version() To get the BuddyPress version 41 */ 42 function bp_db_version() { 43 echo bp_get_db_version(); 44 } 45 /** 46 * Return the BuddyPress database version 47 * 48 * @since BuddyPress (1.6) 49 * @global BuddyPress $bp 50 * @retrun string The BuddyPress version 51 */ 52 function bp_get_db_version() { 53 global $bp; 54 return $bp->db_version; 55 } 56 57 /** Functions *****************************************************************/ 4 58 5 59 /** … … 1120 1174 */ 1121 1175 function bp_is_root_blog( $blog_id = 0 ) { 1176 1122 1177 // Assume false 1123 1178 $is_root_blog = false; … … 1140 1195 * @since 1.5 1141 1196 * 1142 * @param int $blog_id Optional. Defaults to the current blog id.1143 1197 * @return bool $is_root_blog Returns true if this is bp_get_root_blog_id(). 1144 1198 */ 1145 function bp_get_root_blog_id( $blog_id = false ) { 1199 function bp_get_root_blog_id() { 1200 1201 // Default to 1 1202 $root_blog_id = 1; 1146 1203 1147 1204 // Define on which blog ID BuddyPress should run … … 1156 1213 } elseif ( is_multisite() && bp_is_multiblog_mode() ) { 1157 1214 $root_blog_id = get_current_blog_id(); 1158 1159 // Root blog is the only blog on this network1160 } elseif( !is_multisite() ) {1161 $root_blog_id = 1;1162 1215 } 1163 1216
Note: See TracChangeset
for help on using the changeset viewer.