Changeset 9128
- Timestamp:
- 11/10/2014 03:37:06 PM (10 years ago)
- Location:
- trunk/src/bp-settings
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-settings/bp-settings-actions.php
r9041 r9128 466 466 } 467 467 add_action( 'bp_actions', 'bp_settings_verify_email_change' ); 468 469 /** 470 * Removes 'Email' sub nav, if no component has registered options there. 471 * 472 * @since BuddyPress (2.2.0) 473 */ 474 function bp_settings_remove_email_subnav() { 475 if ( ! has_action( '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' ); -
trunk/src/bp-settings/bp-settings-loader.php
r8568 r9128 173 173 ); 174 174 175 // 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 ); 175 // Notifications - only add the tab when there is something to display there. 176 if ( has_action( 'bp_notification_settings' ) ) { 177 $wp_admin_nav[] = array( 178 'parent' => 'my-account-' . $this->id, 179 'id' => 'my-account-' . $this->id . '-notifications', 180 'title' => __( 'Email', 'buddypress' ), 181 'href' => trailingslashit( $settings_link . 'notifications' ) 182 ); 183 } 182 184 183 185 // Delete Account
Note: See TracChangeset
for help on using the changeset viewer.