function sp_is_bp_plugin($slug) { $component = tk_get_bp_component_by_slug($slug); if ($component != 'profile' && $component != 'activity' && $component != 'blogs' && $component != 'forums' && $component != 'friends' && $component != 'groups' && $component != 'messages' && $component != 'members' && $component != 'settings') { return true; } else { return false; } }
function tk_bp_is_active_component($slug) { global $bp; $component_name = tk_get_bp_component_by_slug($slug); if (is_array($bp->active_components)) { $components = array_keys($bp->active_components); foreach ($components as $key => $component) { $components_arr[$key] = tk_get_bp_component_by_slug($component); } } if (is_array($components)) { if (in_array($component_name, $components_arr)) { return true; } else { return false; } } else { return false; } }