Changeset 4628
- Timestamp:
- 07/09/2011 06:58:45 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-filters.php
r4611 r4628 123 123 124 124 foreach( (array)$usernames as $username ) { 125 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )125 if ( bp_is_username_compatibility_mode() ) 126 126 $user_id = username_exists( $username ); 127 127 else -
trunk/bp-activity/bp-activity-functions.php
r4621 r4628 70 70 if ( $usernames = bp_activity_find_mentions( strip_tags( $activity->content ) ) ) { 71 71 foreach( (array)$usernames as $username ) { 72 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )72 if ( bp_is_username_compatibility_mode() ) 73 73 $user_id = username_exists( $username ); 74 74 else -
trunk/bp-activity/bp-activity-notifications.php
r4605 r4628 21 21 22 22 foreach( (array)$usernames as $username ) { 23 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )23 if ( bp_is_username_compatibility_mode() ) 24 24 $receiver_user_id = bp_core_get_userid( $username ); 25 25 else -
trunk/bp-core/bp-core-catchuri.php
r4602 r4628 238 238 239 239 // Switch the displayed_user based on compatbility mode 240 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )240 if ( bp_is_username_compatibility_mode() ) 241 241 $bp->displayed_user->id = (int) bp_core_get_userid( urldecode( $bp_uri[$uri_offset + 1] ) ); 242 242 else -
trunk/bp-core/bp-core-functions.php
r4602 r4628 1200 1200 } 1201 1201 1202 /** 1203 * Are we running username compatibility mode? 1204 * 1205 * @package BuddyPress 1206 * @since 1.3 1207 * 1208 * @uses apply_filters() Filter 'bp_is_username_compatibility_mode' to alter 1209 * @return bool False when compatibility mode is disabled (default); true when enabled 1210 */ 1211 function bp_is_username_compatibility_mode() { 1212 return apply_filters( 'bp_is_username_compatibility_mode', defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) && BP_ENABLE_USERNAME_COMPATIBILITY_MODE ); 1213 } 1202 1214 1203 1215 /** Global Manipulators *******************************************************/ -
trunk/bp-members/bp-members-functions.php
r4605 r4628 105 105 $username = bp_core_get_username( $user_id, $user_nicename, $user_login ); 106 106 107 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )107 if ( bp_is_username_compatibility_mode() ) 108 108 $username = rawurlencode( $username ); 109 109 … … 242 242 243 243 // Pull an audible and use the login over the nicename 244 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )244 if ( bp_is_username_compatibility_mode() ) 245 245 $username = $user_login; 246 246 else … … 459 459 */ 460 460 function bp_core_get_userlink_by_username( $username ) { 461 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )461 if ( bp_is_username_compatibility_mode() ) 462 462 $user_id = bp_core_get_userid( $username ); 463 463 else -
trunk/bp-messages/bp-messages-functions.php
r4623 r4628 67 67 68 68 } else { 69 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )69 if ( bp_is_username_compatibility_mode() ) 70 70 $recipient_id = bp_core_get_userid( $recipient ); 71 71 else -
trunk/bp-themes/bp-default/_inc/ajax.php
r4611 r4628 658 658 continue; 659 659 660 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE') )660 if ( bp_is_username_compatibility_mode() ) 661 661 $username = $ud->user_login; 662 662 else
Note: See TracChangeset
for help on using the changeset viewer.