Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/96c84f186d712ab0b774a72894a7c3cb to your computer and use it in GitHub Desktop.
Save KaineLabs/96c84f186d712ab0b774a72894a7c3cb to your computer and use it in GitHub Desktop.
Youzify - Disable Friendship Notifications Settings
<?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