Changeset 13395 for trunk/src/bp-activity/bp-activity-functions.php
- Timestamp:
- 01/07/2023 12:18:55 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-activity/bp-activity-functions.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-functions.php
r13367 r13395 272 272 * @since 1.9.0 273 273 * 274 * @global wpdb $wpdb WordPress database object. 275 * 274 276 * @param string $mentionname Username of user in @-mentions. 275 277 * @return int|bool ID of the user, if one is found. Otherwise false. 276 278 */ 277 279 function bp_activity_get_userid_from_mentionname( $mentionname ) { 280 global $wpdb; 281 278 282 $user_id = false; 279 283 … … 293 297 // account for hyphens + spaces in the same user_login. 294 298 if ( empty( $userdata ) || ! is_a( $userdata, 'WP_User' ) ) { 295 global $wpdb;296 299 $regex = esc_sql( str_replace( '-', '[ \-]', $mentionname ) ); 297 300 $user_id = $wpdb->get_var( "SELECT ID FROM {$wpdb->users} WHERE user_login REGEXP '{$regex}'" ); … … 305 308 $user_id = bp_core_get_userid_from_nicename( $mentionname ); 306 309 } 307 308 310 309 311 return $user_id; … … 1240 1242 * @since 1.2.0 1241 1243 * 1242 * @global object $wpdb WordPress database access object.1243 *1244 1244 * @param int $activity_id ID of the activity item whose metadata is being deleted. 1245 1245 * @param string $meta_key Optional. The key of the metadata being deleted. If … … 1410 1410 * @since 1.6.0 1411 1411 * 1412 * @global object $wpdb WordPress database accessobject.1412 * @global wpdb $wpdb WordPress database object. 1413 1413 * 1414 1414 * @param int $user_id ID of the user whose activity is being spammed. … … 1479 1479 * @since 1.6.0 1480 1480 * 1481 * @global object $wpdb WordPress database accessobject.1481 * @global wpdb $wpdb WordPress database object. 1482 1482 * 1483 1483 * @param int $user_id ID of the user whose activity is being hammed.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)