bp_core_current_user_ua()
Get the current user’s user-agent.
Description
Return
(string) User agent string.
Source
File: bp-core/bp-core-moderation.php
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | function bp_core_current_user_ua() { // Sanity check the user agent. if ( ! empty ( $_SERVER [ 'HTTP_USER_AGENT' ] ) ) { $retval = substr ( $_SERVER [ 'HTTP_USER_AGENT' ], 0, 254 ); } else { $retval = '' ; } /** * Filters the current user's user-agent. * * @since BuddyPress 1.6.0 * * @param string $retval Current user's user-agent. */ return apply_filters( 'bp_core_current_user_ua' , $retval ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.6.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.