Changeset 3663 for trunk/bp-xprofile/bp-xprofile-templatetags.php
- Timestamp:
- 01/05/2011 10:45:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-templatetags.php
r3650 r3663 618 618 $group_name = bp_profile_group_name(false); 619 619 620 $tabs = array(); 620 621 for ( $i = 0; $i < count($groups); $i++ ) { 621 if ( $group_name == $groups[$i]->name ) {622 if ( $group_name == $groups[$i]->name ) 622 623 $selected = ' class="current"'; 623 } else {624 else 624 625 $selected = ''; 625 } 626 627 if ( $groups[$i]->fields ) 628 echo '<li' . $selected . '><a href="' . $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $groups[$i]->id . '">' . esc_attr( $groups[$i]->name ) . '</a></li>'; 629 } 626 627 if ( $groups[$i]->fields ) { 628 $link = $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $groups[$i]->id; 629 $tabs[] = sprintf( '<li %1$s><a href="%2$s">%3$s</a><li>', $selected, $link, esc_html( $groups[$i]->name ) ); 630 } 631 } 632 633 $tabs = apply_filters( 'xprofile_filter_profile_group_tabs', $tabs, $groups, $group_name ); 634 foreach ( (array)$tabs as $tab ) 635 echo $tab; 630 636 631 637 do_action( 'xprofile_profile_group_tabs' );
Note: See TracChangeset
for help on using the changeset viewer.