Skip to content

Instantly share code, notes, and snippets.

View phoopee3's full-sized avatar

Jason Lawton phoopee3

View GitHub Profile
@phoopee3
phoopee3 / Buddypress-Group-Check.php
Created January 18, 2018 01:59
Check if a user is part of an existing buddypress group
<?php
// check user against an existing buddypress group
// I needed this in a category.php file to see if
// we were looking at a specific category, and if
// so, check if the user is in a buddypress group
// to ensure they should have access
if ( has_category( 'Some Category') && function_exists( 'groups_is_user_member' ) ) {
$group_id = BP_Groups_Group::group_exists('buddypress-group-slug');
$is_member = groups_is_user_member( wp_get_current_user()->id, $group_id );
if ( !$is_member ) {
@phoopee3
phoopee3 / gist:b979e786929efe8ba860
Created March 18, 2015 19:43
Parallax scroll and fade text on scroll
/**
* from http://paper-leaf.com/blog/2015/02/march-2015-desktop-calendar-wallpaper/
* Can't find original source
**/
/**
* Created by Sallar Kaboli <sallar.kaboli@gmail.com>
* @sallar
*
* Released under the MIT License.