<?php
/**
 * @package BC_Security
 */
namespace BlueChip\Security\Helpers;

/**
 * Various is::xxx() helpers.
 */
class Is
{
    /**
     * Return true, if current user is an admin.
     *
     * @param \WP_User $user
     * @return bool
     */
    public static function admin(\WP_User $user)
    {
        return is_multisite() ? user_can($user, 'manage_network') : user_can($user, 'manage_options');
    }
}

Add helper method to determine whether user is admin.
Add helper method to determine whether user is admin.

Check implementation is taken from Wordfence Security plugin.
