diff --git a/inc/fun/comment.php b/inc/fun/comment.php index de8b0a90..f2ef8415 100755 --- a/inc/fun/comment.php +++ b/inc/fun/comment.php @@ -1,5 +1,7 @@ comment_agent); + $commentUserAgent = parse_user_agent($comment->comment_agent); $commentOsIcon = pk_get_comment_ua_os_icon($commentUserAgent['platform']); $commentBrowserIcon = pk_get_comment_ua_os_icon($commentUserAgent['browser']); echo " {$commentUserAgent['platform']} "; diff --git a/inc/user-agent-parse.php b/inc/user-agent-parse.php index a00525bb..768d9d24 100644 --- a/inc/user-agent-parse.php +++ b/inc/user-agent-parse.php @@ -9,26 +9,6 @@ * @license MIT /~https://github.com/donatj/PhpUserAgent/blob/master/LICENSE.md */ -namespace { - - /** - * Parses a user agent string into its important parts - * - * This method is defined for backwards comparability with the old global method. - * - * @param string|null $u_agent User agent string to parse or null. Uses $_SERVER['HTTP_USER_AGENT'] on NULL - * @return string[] an array with 'browser', 'version' and 'platform' keys - * @throws \InvalidArgumentException on not having a proper user agent to parse. - * - * @deprecated This exists for backwards compatibility with 0.x and will likely be removed in 2.x - * @see \donatj\UserAgent\parse_user_agent - */ - function parse_user_agent($u_agent = null) - { - return \donatj\UserAgent\parse_user_agent($u_agent); - } -} - namespace donatj\UserAgent { const PLATFORM = 'platform';