bp_core_current_user_ua()
Get the current user’s user-agent.
Description Description
Return Return
(string) User agent string.
Source Source
File: bp-core/bp-core-moderation.php
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 1.6.0 * * @param string $retval Current user's user-agent. */ return apply_filters( 'bp_core_current_user_ua', $retval ); }
Changelog Changelog
Version | Description |
---|---|
1.6.0 | Introduced. |