コード例 #1
0
ファイル: functions.php プロジェクト: Lady1178/bp-chat
/**
 * 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'));
}
コード例 #2
0
ファイル: functions.php プロジェクト: Lady1178/bp-chat
/**
 * 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;
}