Skip to:
Content

BuddyPress.org

Changeset 934


Ignore:
Timestamp:
01/27/2009 06:42:12 PM (18 years ago)
Author:
apeatling
Message:

Adding localization support to bp_group_type(). Props to GIGALinux.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-templatetags.php

    r930 r934  
    228228function bp_group_type() {
    229229        global $groups_template;
    230         echo apply_filters( 'bp_group_type', ucwords($groups_template->group->status) . ' ' . __('Group', 'buddypress') );     
     230       
     231        if ( $groups_template->group->status == 'public' ) {
     232                $type = __( "Public Group", "buddypress" );
     233        } else if ( $groups_template->group->status == 'hidden' ) {     
     234                $type = __( "Hidden Group", "buddypress" );
     235        } else if ( $groups_template->group->status == 'private' ) {
     236                $type = __( "Private Group", "buddypress" );
     237        } else {
     238                $type = ucwords( $groups_template->group->status ) . ' ' . __( 'Group', 'buddypress' );
     239        }
     240       
     241        echo apply_filters( 'bp_group_type',  $type ); 
    231242}
    232243
Note: See TracChangeset for help on using the changeset viewer.