Esempio n. 1
0
/**
 * Check if the chat UI is disabled
 * 
 * @since 1.0.0
 * 
 * @return type
 */
function bpchat_is_disabled()
{
    return apply_filters('bpchat_is_disabled', bpchat_get_option('is_disabled'));
}
Esempio n. 2
0
/**
 * Get the users chat preference
 * We use it to create the roaster
 * 
 * @param type $user_id
 * @return type
 */
function bpchat_get_user_chat_preference($user_id)
{
    $preference = bp_get_user_meta($user_id, 'bpchat_preference', true);
    if (empty($preference)) {
        $preference = bpchat_get_option('default_chat_preference');
    }
    return $preference;
}