[buddypress-trac] [BuddyPress Trac] #5441: Profile Settings show "Email" sub tab even if content is empty

buddypress-trac noreply at wordpress.org
Fri Oct 31 12:42:55 UTC 2014

#5441: Profile Settings show "Email" sub tab even if content is empty
 Reporter:  landwire                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  2.2
Component:  Settings                    |     Version:  1.9.2
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |

Comment (by boonebgorges):

 pro120 - Thanks for the patch. I like how your approach is fairly
 straightforward, but I am nervous that there are edge cases where it will
 cause backward compatibility problems. In particular, if you have disabled
 Friends, Forums, and Messages, but you have enabled a third-party plugin
 that adds settings to this screen, it'll disappear unless that plugin
 author updates the plugin to filter 'bp_components_using_email_tab'. I
 think a safer technique is probably something like this:

 - Register the Email tab in the normal way
 - At some point after core is initialized, and after plugins have had a
 chance to load themselves, but *before* we render the screen, do something
 like this:

 if ( ! has_filter( 'bp_notification_settings' ) ) {
     bp_core_remove_subnav_item( ... );

 The trick here will be to find the proper place in the load order to make
 this happen. I'd suggest: as late as possible before loading the screen,
 maybe on 'bp_actions'.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5441#comment:8>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list