This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter members list for logged in user's member type. | |
* | |
* @param array $args member query args. | |
* | |
* @return array | |
*/ | |
function buddydev_filter_members_list_exclude_logged_member_type( $args ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function smc_update_xprofile($userid,$field,$value) { | |
// alternative to get user ID | |
// global $current_user; | |
// get_currentuserinfo(); | |
// $field = 'Foo'; // xProfile field name | |
// $value = 'bar'; // desired value | |
// xprofile_set_field_data($field, $current_user->id, $value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Add to BuddyPress groups and forums (including sub-forums) based on xProfile checkbox selection | |
*/ | |
function my_bp_core_signup_user($user_id) | |
{ | |
$groups = array(1 => "HIKING", | |
2 => "PADDLING", | |
3 => "CYCLING", | |
4=> "SKIING",); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register Subai Actions. | |
*/ | |
function yz_register_subai_post_actions() { | |
// Init Vars | |
$bp = buddypress(); | |
bp_activity_set_action( | |
$bp->activity->id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'get_header', 'bp_guest_redirect', 1 ); | |
/** | |
* Redirect BuddyPress guests to register page | |
* @return [type] [description] | |
*/ | |
function bp_guest_redirect() { | |
global $bp; | |
if ( bp_is_activity_component() || bp_is_user_profile() || bp_is_groups_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'bp_get_member_avatar', 'my_add_user_level_to_avatars', 10, 2 ); | |
/** | |
* @param string $value Formatted HTML <img> element, or raw avatar URL based on $html arg. | |
* @param array $r Array of parsed arguments. See {@link bp_get_member_avatar()}. | |
*/ | |
function my_add_user_level_to_avatars( $value, $r ) { | |
global $members_template; | |
// The args have already been parsed in bp_get_member_avatar. We'll use them except for the css class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Force Buddypress Covers Activation. | |
*/ | |
function youzer_activate_buddypress_covers() { | |
return true; | |
} | |
add_filter( 'bp_is_profile_cover_image_active', 'youzer_activate_buddypress_covers', 999 ); | |
add_filter( 'bp_is_groups_cover_image_active', 'youzer_activate_buddypress_covers', 999 ); |
OlderNewer