diff --git src/bp-settings/bp-settings-actions.php src/bp-settings/bp-settings-actions.php
index a579b0e..22ed2f3 100644
|
|
|
function bp_settings_verify_email_change(){
|
| 465 | 465 | } |
| 466 | 466 | } |
| 467 | 467 | add_action( 'bp_actions', 'bp_settings_verify_email_change' ); |
| | 468 | |
| | 469 | /** |
| | 470 | * Removes 'Email' sub nav, if there are no options. |
| | 471 | * |
| | 472 | * @since BuddyPress (2.2.0) |
| | 473 | */ |
| | 474 | function bp_settings_remove_email_subnav() { |
| | 475 | if ( ! has_filter( 'bp_notification_settings' ) ) { |
| | 476 | bp_core_remove_subnav_item( BP_SETTINGS_SLUG, 'notifications' ); |
| | 477 | } |
| | 478 | } |
| | 479 | add_action( 'bp_actions', 'bp_settings_remove_email_subnav' ); |
| | 480 | No newline at end of file |
diff --git src/bp-settings/bp-settings-loader.php src/bp-settings/bp-settings-loader.php
index ce07fbe..9ccd94e 100644
|
|
|
class BP_Settings_Component extends BP_Component {
|
| 172 | 172 | 'href' => trailingslashit( $settings_link . 'general' ) |
| 173 | 173 | ); |
| 174 | 174 | |
| | 175 | |
| 175 | 176 | // Notifications |
| 176 | | $wp_admin_nav[] = array( |
| 177 | | 'parent' => 'my-account-' . $this->id, |
| 178 | | 'id' => 'my-account-' . $this->id . '-notifications', |
| 179 | | 'title' => __( 'Email', 'buddypress' ), |
| 180 | | 'href' => trailingslashit( $settings_link . 'notifications' ) |
| 181 | | ); |
| | 177 | if ( has_filter( 'bp_notification_settings' ) ) { |
| | 178 | $wp_admin_nav[] = array( |
| | 179 | 'parent' => 'my-account-' . $this->id, |
| | 180 | 'id' => 'my-account-' . $this->id . '-notifications', |
| | 181 | 'title' => __( 'Email', 'buddypress' ), |
| | 182 | 'href' => trailingslashit( $settings_link . 'notifications' ) |
| | 183 | ); |
| | 184 | } |
| 182 | 185 | |
| 183 | 186 | // Delete Account |
| 184 | 187 | if ( !bp_current_user_can( 'bp_moderate' ) && empty( $bp->site_options['bp-disable-account-deletion'] ) ) { |