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
/** | |
* Restrict access to BuddyPress to members having assigned member type. | |
*/ | |
function buddydev_protect_bp_from_non_members() { | |
// Do not restrict if | |
// Not BuddyPress, or Registration/Activation page or is site admin. | |
if ( ! is_buddypress() || bp_is_register_page() || bp_is_activation_page() || is_super_admin() ) { | |
return; | |
} |
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
/** | |
* Auto join user to current group when using BuddyPress Ajax Registration plugin. | |
* | |
* @param int $user_id user id. | |
*/ | |
function buddydev_auto_join_current_group_on_activation( $user_id ) { | |
if ( bp_is_group() ) { | |
groups_join_group( groups_get_current_group()->id, $user_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
/** | |
* Get the applicable limit for the given role. | |
* | |
* @param string $role role name. | |
* | |
* @return array | |
*/ | |
function buddydev_custom_get_role_based_message_limit( $role ) { |
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
/** | |
* Attach media with comments on a mediapress activity. | |
* | |
* @param int $comment_id comment id. | |
* @param array $r args. | |
* @param BP_Activity_Activity $activity activity object. | |
*/ | |
function mpp_custom_comment_posted( $comment_id, $r, $activity ) { |
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
/** | |
* Redirect user to some page on site when automatically activated and logged in. | |
* | |
* @param string $url url to redirect to. | |
* @param int $user_id user id. | |
* | |
* @return string | |
*/ | |
function buddydev_custom_activation_redirect( $url, $user_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
/** | |
* Add block/unblock button on single message thread. | |
*/ | |
function buddydev_show_user_report_button_on_message_thread() { | |
// only message involving single user can be blocked. | |
if ( ! function_exists( 'bpmts_report_button' ) || ! bp_is_my_profile() ) { | |
return; | |
} |
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
class BP_Other_User_As_Profile_Field { | |
/** | |
* Field id, replace with actual field id. | |
* | |
* @var string | |
*/ | |
private $field_id = 25; // Chang it with actual field 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
/** | |
* Class BP_Featured_Member_Expirable_Membership | |
* | |
* @author Ravi Sharma | |
*/ | |
class BP_Featured_Member_Expirable_Membership{ | |
/** | |
* Singleton Instance |
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
/** | |
* BuddyPress User Contact Form extension. | |
*/ | |
class BPUCF_Custom_Extend { | |
public function __construct() { | |
$this->setup(); | |
} |