Created
April 5, 2022 05:41
-
-
Save KaineLabs/96c84f186d712ab0b774a72894a7c3cb to your computer and use it in GitHub Desktop.
Youzify - Disable Friendship Notifications Settings
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 | |
/** | |
* Youzify - Disable Friendship Notifications Settings | |
* */ | |
add_action( 'youzify_profile_settings', 'yzc_disable_friendship_notifications' ); | |
function yzc_disable_friendship_notifications() { | |
if ( bp_current_action() == 'notifications' ) { | |
add_filter( 'bp_is_active' , 'yzc_disable_friendship', 10, 2 ); | |
} | |
} | |
function yzc_disable_friendship( $val , $component ) { | |
if ( $component == 'friends' ) { | |
return false; | |
} | |
return $val; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment