get_user_agent example

public static function auto_check_comment( $commentdata$context = 'default' ) {
        // If no key is configured, then there's no point in doing any of this.         if ( ! self::get_api_key() ) {
            return $commentdata;
        }

        self::$last_comment_result = null;

        $comment = $commentdata;

        $comment['user_ip']      = self::get_ip_address();
        $comment['user_agent']   = self::get_user_agent();
        $comment['referrer']     = self::get_referer();
        $comment['blog']         = get_option( 'home' );
        $comment['blog_lang']    = get_locale();
        $comment['blog_charset'] = get_option('blog_charset');
        $comment['permalink']    = get_permalink( $comment['comment_post_ID'] );

        if ( ! empty( $comment['user_ID'] ) ) {
            $comment['user_role'] = Akismet::get_user_roles( $comment['user_ID'] );
        }

        /** See filter documentation in init_hooks(). */
        
Home | Imprint | This part of the site doesn't use cookies.