Changeset 5808
- Timestamp:
- 02/19/2012 02:22:00 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/deprecated/1.6.php
r5657 r5808 88 88 89 89 /** 90 * Groups functions 91 */ 92 93 /** 94 * @deprecated 1.6 95 * @deprecated Renamed to groups_get_id() for greater consistency 96 */ 97 function groups_check_group_exists( $group_slug ) { 98 _deprecated_function( __FUNCTION__, '1.6', 'groups_get_id()' ); 99 return groups_get_id( $group_slug ); 100 } 101 102 /** 90 103 * Activity functions 91 104 */ -
trunk/bp-groups/bp-groups-functions.php
r5729 r5808 258 258 } 259 259 260 /** 261 * Get a group slug by its ID 262 * 263 * @param int $group_id The numeric ID of the group 264 * @return string The group's slug 265 */ 260 266 function groups_get_slug( $group_id ) { 261 267 $group = groups_get_group( array( 'group_id' => $group_id ) ); 262 return $group->slug; 268 return !empty( $group->slug ) ? $group->slug : ''; 269 } 270 271 /** 272 * Get a group ID by its slug 273 * 274 * @since 1.6 275 * 276 * @param string $group_slug The group's slug 277 * @return int The ID 278 */ 279 function groups_get_id( $group_slug ) { 280 return (int)BP_Groups_Group::group_exists( $group_slug ); 263 281 } 264 282 … … 359 377 360 378 /*** General Group Functions ****************************************************/ 361 362 function groups_check_group_exists( $group_id ) {363 return BP_Groups_Group::group_exists( $group_id );364 }365 379 366 380 function groups_get_group_admins( $group_id ) {
Note: See TracChangeset
for help on using the changeset viewer.