Changeset 8688
- Timestamp:
- 07/24/2014 01:29:00 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-legacy/buddypress/members/single/profile/edit.php
r8178 r8688 10 10 <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4> 11 11 12 <ul class="button-nav"> 12 <?php if ( bp_profile_has_multiple_groups() ) : ?> 13 <ul class="button-nav"> 13 14 14 <?php bp_profile_group_tabs(); ?>15 <?php bp_profile_group_tabs(); ?> 15 16 16 </ul> 17 </ul> 18 <?php endif ;?> 17 19 18 20 <div class="clear"></div> -
trunk/src/bp-xprofile/bp-xprofile-template.php
r8677 r8688 590 590 } 591 591 592 /** 593 * Get all profile field groups. 594 * 595 * @since BuddyPress (2.1.0) 596 * 597 * @return object $groups 598 */ 599 function bp_profile_get_field_groups() { 600 $groups = wp_cache_get( 'xprofile_groups_inc_empty', 'bp' ); 601 602 if ( empty( $groups ) ) { 603 $groups = BP_XProfile_Group::get( array( 'fetch_fields' => true ) ); 604 wp_cache_set( 'xprofile_groups_inc_empty', $groups, 'bp' ); 605 } 606 607 return apply_filters( 'bp_profile_get_field_groups', $groups ); 608 } 609 610 /** 611 * Check if there is more than one group of fields for the profile being edited. 612 * 613 * @since BuddyPress (2.1.0) 614 * 615 * @return bool True if there is more than one profile field group. 616 */ 617 function bp_profile_has_multiple_groups() { 618 $has_multiple_groups = count( (array) bp_profile_get_field_groups() ) > 1; 619 return (bool) apply_filters( 'bp_profile_has_multiple_groups', $has_multiple_groups ); 620 } 621 622 /** 623 * Output the tabs to switch between profile field groups. 624 * 625 * @return string Field group tabs markup. 626 */ 592 627 function bp_profile_group_tabs() { 593 628 global $bp, $group_name; 594 629 595 if ( !$groups = wp_cache_get( 'xprofile_groups_inc_empty', 'bp' ) ) { 596 $groups = BP_XProfile_Group::get( array( 'fetch_fields' => true ) ); 597 wp_cache_set( 'xprofile_groups_inc_empty', $groups, 'bp' ); 598 } 630 $groups = bp_profile_get_field_groups(); 599 631 600 632 if ( empty( $group_name ) )
Note: See TracChangeset
for help on using the changeset viewer.