Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Add Multiple Checkboxes To Donation Form

/** * Add a collection of checkboxes to the donation form. * * This snippet only works in Charitable 1.5 or above. * */ function wpchar_charitable_register_new_checkboxes_field() { if ( ! class_exists(“Charitable_Donation_Field” ) ) { return; }; /** * Define a…Continue reading

Get Team ID

function team_current_group_id() {     $current_group    = groups_get_current_group();     $current_group_id = isset( $current_group->id ) ? (int) $current_group->id : 0;       /**      * Filters the ID of the current group.      *      * @since BuddyPress 1.5.0      *      * @param int    $current_group_id ID of the current…Continue reading

Get Team ID

function team_current_group_id() {     $current_group    = groups_get_current_group();     $current_group_id = isset( $current_group->id ) ? (int) $current_group->id : 0;       /**      * Filters the ID of the current group.      *      * @since BuddyPress 1.5.0      *      * @param int    $current_group_id ID of the current…Continue reading

Team Activity Feed

function team_activity_feed() {       // Bail if not viewing a single group or activity is not active.     if ( ! bp_is_active( ‘groups’ ) || ! bp_is_active( ‘activity’ ) || ! bp_is_group() ) {         return;     } ?>       Continue reading

Team Activity Feed

function team_activity_feed() {       // Bail if not viewing a single group or activity is not active.     if ( ! bp_is_active( ‘groups’ ) || ! bp_is_active( ‘activity’ ) || ! bp_is_group() ) {         return;     } ?>       Continue reading

Team Activity Feed

function team_activity_feed() {       // Bail if not viewing a single group or activity is not active.     if ( ! bp_is_active( ‘groups’ ) || ! bp_is_active( ‘activity’ ) || ! bp_is_group() ) {         return;     } ?>       Continue reading

BP Get New Group

function get_team_ID() { $bp = buddypress(); $new_group_id = isset( $bp->groups->new_group_id ) ? $bp->groups->new_group_id : 0; /** * Filters the new group ID. * * @since BuddyPress 1.1.0 * * @param int $new_group_id ID of the new group. */ return (int)…Continue reading