Created
January 9, 2019 22:04
-
-
Save KaineLabs/bdf115fa3a62bffbb4c731a611a021cf to your computer and use it in GitHub Desktop.
Allow "Follows" Tab Visibility to Admins and Profile Owner Only
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 | |
/** | |
* Allow "Follows" Tab Visibility to Admins and Profile Owner Only. | |
*/ | |
function yzc_remove_follows_tab() { | |
if ( bp_is_my_profile() || is_super_admin() ) { | |
return; | |
} | |
// Tabs Slugs To remove.. | |
bp_core_remove_nav_item( 'follows' ); | |
} | |
add_action( 'bp_setup_nav', 'yzc_remove_follows_tab', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment