Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
KaineLabs / yzc_reorder_group_tabs.php
Created Nov 19, 2022
Youzify - BuddyPress Reorder Group Tabs
View yzc_reorder_group_tabs.php
<?php
function yzc_reorder_group_tabs() {
global $bp;
if ( isset( $bp->groups->current_group->slug ) && $bp->groups->current_group->slug == $bp->current_item ) {
$bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['position'] = 10;
$bp->bp_options_nav[$bp->groups->current_group->slug]['home']['position'] = 20;
$bp->bp_options_nav[$bp->groups->current_group->slug]['info']['position'] = 30;
$bp->bp_options_nav[$bp->groups->current_group->slug]['members']['position'] = 40;
$bp->bp_options_nav[$bp->groups->current_group->slug]['media']['position'] = 50;
}
View youzify_profile_header_show_member_type_meta.php
<?php
add_filter( 'youzify_profile_header_show_member_type_meta', '_return_false' );
@KaineLabs
KaineLabs / yzc_edit_activity_scrollable.css
Created May 11, 2020
Make Edit Activity Popup Scrollable
View yzc_edit_activity_scrollable.css
/* Created By Sultrio. */
@media only screen and (min-width: 1224px) {
#youzer-edit-activity-wrapper .emojionearea.yz-wall-textarea.bp-suggestions {
height: 550px !important;
overflow-y: scroll !important;
}
}
@KaineLabs
KaineLabs / yzc_change_member_username.php
Last active Nov 14, 2022
hange Member Username with Xprofile Fullname
View yzc_change_member_username.php
<?php
/**
* hange Member Username with Xprofile Fullname
*/
function yzc_change_member_username( $member_name ) {
// Get User Id.
$user_id = bp_get_member_user_id() ? bp_get_member_user_id() : 0;
@KaineLabs
KaineLabs / wpb_sender_email.php
Created Apr 27, 2021
WordPress Change Sender Email and Sender Name
View wpb_sender_email.php
<?php
// Function to change email address
add_filter( 'wp_mail_from', 'wpb_sender_email' );
function wpb_sender_email( $original_email_address ) {
return 'contact@lapakibuk.com';
}
// Function to change sender name
View yzc_redirect_after_activation.php
<?php
/**
* Redirect User After Activation
*/
function yzc_redirect_after_activation($user) {
$redirect_url = 'yoururl';
bp_core_redirect( $redirect_url );
}
add_action( 'bp_core_activated_user', 'yzc_redirect_after_activation', 100, 1 );
@KaineLabs
KaineLabs / yzc_fix_youzify_albums_count.php
Last active Nov 13, 2022
Youzify Albums - Fix albums count
View yzc_fix_youzify_albums_count.php
<?php
/**
* Youzify Albums - Fix albums count
**/
add_action( 'init', 'yzc_fix_youzify_albums_count', 10);
function yzc_fix_youzify_albums_count( ) {
@KaineLabs
KaineLabs / yzc_add_xprofile_field_data_after_username.php
Last active Nov 8, 2022
Show Buddypress Xprofile Field Data After The username in The Members Directory.
View yzc_add_xprofile_field_data_after_username.php
<?php
/**
* Show Xprofile Field Data After The username in The Members Directory.
*/
function yzc_add_xprofile_field_data_after_username( $name ) {
if ( bp_is_members_directory() ) {
$field_data = xprofile_get_field_data( 'Age', bp_get_member_user_id() );
@KaineLabs
KaineLabs / yzc_add_youzer_actions_support.php
Last active Nov 8, 2022
Enable Youzer Actions Buddypress Group Email Subscription
View yzc_add_youzer_actions_support.php
<?php
/**
* Enable Youzer Actions.
*/
function yzc_add_youzer_actions_support( $retval, $type ) {
// Get Youzer Actions.
$custom_actions = array( 'activity_link', 'activity_link', 'activity_status', 'activity_file', 'activity_audio', 'activity_photo', 'activity_quote', 'activity_slideshow', 'new_cover', 'new_avatar' );
View yz-integrate-nextend-plugin.php
<?php
/**
* Integrate NEXTEND PLUGIN
*/
function yz_integrate_nextend_plugin() {
if( class_exists( 'NextendSocialLogin', false ) ) {
echo NextendSocialLogin::renderButtonsWithContainer();
}
}