Changeset 9676 for trunk/src/bp-xprofile/bp-xprofile-template.php
- Timestamp:
- 04/01/2015 11:14:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-template.php
r9515 r9676 881 881 */ 882 882 function bp_profile_get_field_groups() { 883 $groups = wp_cache_get( 'xprofile_groups_inc_empty', 'bp' ); 884 885 if ( empty( $groups )) {883 884 $groups = wp_cache_get( 'all', 'bp_xprofile_groups' ); 885 if ( false === $groups ) { 886 886 $groups = bp_xprofile_get_groups( array( 'fetch_fields' => true ) ); 887 wp_cache_set( ' xprofile_groups_inc_empty', $groups, 'bp' );887 wp_cache_set( 'all', $groups, 'bp_xprofile' ); 888 888 } 889 889 … … 974 974 } 975 975 function bp_get_profile_group_name() { 976 if ( !$group_id = bp_action_variable( 1 ) ) 976 977 // Check action variable 978 $group_id = bp_action_variable( 1 ); 979 if ( empty( $group_id ) || ! is_numeric( $group_id ) ) { 977 980 $group_id = 1; 978 979 if ( !is_numeric( $group_id ) ) 980 $group_id = 1; 981 982 if ( !$group = wp_cache_get( 'xprofile_group_' . $group_id, 'bp' ) ) { 983 $group = new BP_XProfile_Group($group_id); 984 wp_cache_set( 'xprofile_group_' . $group_id, $group, 'bp' ); 985 } 981 } 982 983 // Check for cached group 984 $group = new BP_XProfile_Group( $group_id ); 986 985 987 986 /**
Note: See TracChangeset
for help on using the changeset viewer.