Changeset 5134
- Timestamp:
- 09/09/2011 09:10:47 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r5111 r5134 1244 1244 } 1245 1245 1246 /** 1247 * Is this a user's settings page? 1248 * 1249 * @package BuddyPress 1250 * 1251 * @return bool 1252 */ 1253 function bp_is_user_settings() { 1254 if ( bp_is_user() && bp_is_settings_component() ) 1255 return true; 1256 1257 return false; 1258 } 1259 1260 /** 1261 * Is this a user's General Settings page? 1262 * 1263 * @package BuddyPress 1264 * @since 1.5 1265 * 1266 * @return bool 1267 */ 1268 function bp_is_user_settings_general() { 1269 if ( bp_is_user_settings() && bp_is_current_action( 'general' ) ) 1270 return true; 1271 1272 return false; 1273 } 1274 1275 /** 1276 * Is this a user's Notification Settings page? 1277 * 1278 * @package BuddyPress 1279 * @since 1.5 1280 * 1281 * @return bool 1282 */ 1283 function bp_is_user_settings_notifications() { 1284 if ( bp_is_user_settings() && bp_is_current_action( 'notifications' ) ) 1285 return true; 1286 1287 return false; 1288 } 1289 1290 /** 1291 * Is this a user's Account Deletion page? 1292 * 1293 * @package BuddyPress 1294 * @since 1.5 1295 * 1296 * @return bool 1297 */ 1298 function bp_is_user_settings_account_delete() { 1299 if ( bp_is_user_settings() && bp_is_current_action( 'delete-account' ) ) 1300 return true; 1301 1302 return false; 1303 } 1304 1305 1246 1306 /** Groups ******************************************************************/ 1247 1307 -
trunk/bp-settings/bp-settings-loader.php
r4961 r5134 78 78 ); 79 79 80 $settings_link = trailingslashit( $bp->displayed_user->domain . $this->slug ); 80 // Determine user to use 81 if ( isset( $bp->displayed_user->domain ) ) 82 $user_domain = $bp->displayed_user->domain; 83 elseif ( isset( $bp->loggedin_user->domain ) ) 84 $user_domain = $bp->loggedin_user->domain; 85 else 86 return; 87 88 $settings_link = trailingslashit( $user_domain . $this->slug ); 81 89 82 90 // Add General Settings nav item -
trunk/bp-themes/bp-default/members/single/home.php
r4961 r5134 40 40 41 41 if ( bp_is_user_activity() || !bp_current_component() ) : 42 locate_template( array( 'members/single/activity.php' ), true );42 locate_template( array( 'members/single/activity.php' ), true ); 43 43 44 44 elseif ( bp_is_user_blogs() ) : 45 locate_template( array( 'members/single/blogs.php' ), true );45 locate_template( array( 'members/single/blogs.php' ), true ); 46 46 47 47 elseif ( bp_is_user_friends() ) : 48 locate_template( array( 'members/single/friends.php' ), true );48 locate_template( array( 'members/single/friends.php' ), true ); 49 49 50 50 elseif ( bp_is_user_groups() ) : 51 locate_template( array( 'members/single/groups.php' ), true );51 locate_template( array( 'members/single/groups.php' ), true ); 52 52 53 53 elseif ( bp_is_user_messages() ) : 54 locate_template( array( 'members/single/messages.php' ), true );54 locate_template( array( 'members/single/messages.php' ), true ); 55 55 56 56 elseif ( bp_is_user_profile() ) : 57 locate_template( array( 'members/single/profile.php' ), true );57 locate_template( array( 'members/single/profile.php' ), true ); 58 58 59 59 elseif ( bp_is_user_forums() ) : 60 locate_template( array( 'members/single/forums.php' ), true ); 60 locate_template( array( 'members/single/forums.php' ), true ); 61 62 elseif ( bp_is_user_settings() ) : 63 locate_template( array( 'members/single/settings.php' ), true ); 61 64 62 65 // If nothing sticks, load a generic template 63 66 else : 64 locate_template( array( 'members/single/ front.php'), true );67 locate_template( array( 'members/single/plugins.php' ), true ); 65 68 66 69 endif;
Note: See TracChangeset
for help on using the changeset viewer.