Changeset 2832 for branches/1.2/bp-core/bp-core-templatetags.php
- Timestamp:
- 03/11/2010 04:52:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core/bp-core-templatetags.php
r2820 r2832 1184 1184 extract( $r, EXTR_SKIP ); 1185 1185 1186 if ( !bp_core_is_multisite() && !empty( $_POST['signup_username'] ) ) { 1187 $user_id = bp_core_get_userid( $_POST['signup_username'] ); 1188 return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) ); 1186 $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir; 1187 1188 if ( empty( $signup_avatar_dir ) ) { 1189 if ( empty( $bp->grav_default->user ) ) { 1190 $default_grav = 'wavatar'; 1191 } else if ( 'mystery' == $bp->grav_default->user ) { 1192 $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg'; 1193 } else { 1194 $default_grav = $bp->grav_default->user; 1195 } 1196 1197 $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ); 1198 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />'; 1189 1199 } else { 1190 $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir; 1191 1192 if ( empty( $signup_avatar_dir ) ) { 1193 if ( empty( $bp->grav_default->user ) ) { 1194 $default_grav = 'wavatar'; 1195 } else if ( 'mystery' == $bp->grav_default->user ) { 1196 $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg'; 1197 } else { 1198 $default_grav = $bp->grav_default->user; 1199 } 1200 1201 $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ); 1202 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />'; 1203 } else { 1204 return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) ); 1205 } 1200 return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) ); 1206 1201 } 1207 1202 } … … 1246 1241 1247 1242 function bp_registration_needs_activation() { 1248 return apply_filters( 'bp_registration_needs_activation', bp_core_is_multisite());1243 return apply_filters( 'bp_registration_needs_activation', true ); 1249 1244 } 1250 1245
Note: See TracChangeset
for help on using the changeset viewer.