Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/20/2013 09:58:24 PM (11 years ago)
Author:
r-a-y
Message:

Notifications: Only show profile nav item if user can edit settings.

See #5251 - point 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-notifications/bp-notifications-loader.php

    r7546 r7593  
    107107        $count    = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
    108108        $main_nav = array(
    109             'name'                => sprintf( __( 'Notifications <span>%d</span>', 'buddypress' ), number_format_i18n( $count ) ),
    110             'slug'                => $this->slug,
    111             'position'            => 30,
    112             'screen_function'     => 'bp_notifications_screen_unread',
    113             'default_subnav_slug' => 'unread',
    114             'item_css_id'         => $this->id,
     109            'name'                    => sprintf( __( 'Notifications <span>%d</span>', 'buddypress' ), number_format_i18n( $count ) ),
     110            'slug'                    => $this->slug,
     111            'position'                => 30,
     112            'show_for_displayed_user' => bp_core_can_edit_settings(),
     113            'screen_function'         => 'bp_notifications_screen_unread',
     114            'default_subnav_slug'     => 'unread',
     115            'item_css_id'             => $this->id,
    115116        );
    116117
Note: See TracChangeset for help on using the changeset viewer.