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
/** | |
* 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
class BuddyDev_Profile_Field_Completion_Helper { | |
/** | |
* Show notice to user? | |
* | |
* @var bool | |
*/ | |
private $show_notice = true; |
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
INSERT INTO wp_bp_activity(user_id, component, type, action, content, primary_link, item_id, date_recorded ) select ID, 'members', 'last_activity', '', '', '', 0, NOW() FROM wp_users WHERE ID NOT IN (SELECT user_id FROM `wp_bp_activity` WHERE type="last_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
/** | |
* BuddyPress User Contact Form extension. | |
*/ | |
class BPUCF_Custom_Extend { | |
public function __construct() { | |
$this->setup(); | |
} |
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
/** | |
* Mark account status as inactive when they activate their BuddyPress account after signup. | |
* | |
* @param int $user_id user id. | |
*/ | |
function buddydev_custom_keep_user_inactive( $user_id ) { | |
if ( ! function_exists( 'bp_account_deactivator' ) ) { | |
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
/** | |
* Fetch of Latest Post content of a user by post type. | |
* | |
* @param array $atts shortcode atts. | |
* @param string $content n/a | |
* | |
* @return mixed|string | |
*/ | |
function buddydev_user_last_post_shortcode( $atts, $content = '' ) { |
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
/** | |
* Helper class for adding the trail items to breadcrumb trail | |
* | |
* @copyright 2018, Brajesh Singh. | |
*/ | |
class BuddyDev_BP_Breadcrumb { | |
/** | |
* Add BuddyPress User/group specific trail items |
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 BuddyDev_Profile_Field_Completion_Helper { | |
/** | |
* Which member type should be set? PLease change it. | |
* | |
* @var string | |
*/ | |
private $member_type = 'YOUR_MEMBER_TYPE'; // Please Change it. | |
/** |
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
/** | |
* Enable activity wire upload with MediaPress. | |
* | |
* @param bool $can allow upload or not. | |
* | |
* @return bool | |
*/ | |
function buddydev_enable_activity_wire_upload( $can ) { |