Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/09/2013 02:04:36 PM (9 years ago)
Author:
boonebgorges
Message:

Introduces bp_activity_do_mentions(), a toggle for the activity mentions feature

Fixes #3388

Props thebrandonallen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-screens.php

    r6596 r7193  
    266266function bp_activity_screen_notification_settings() {
    267267
    268     if ( !$mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) )
    269         $mention = 'yes';
    270 
    271     if ( !$reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) )
    272         $reply = 'yes'; ?>
     268    if ( bp_activity_do_mentions() ) {
     269        if ( ! $mention = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_mention', true ) ) {
     270            $mention = 'yes';
     271        }
     272    }
     273
     274    if ( ! $reply = bp_get_user_meta( bp_displayed_user_id(), 'notification_activity_new_reply', true ) ) {
     275        $reply = 'yes';
     276    }
     277
     278    ?>
    273279
    274280    <table class="notification-settings" id="activity-notification-settings">
     
    283289
    284290        <tbody>
    285             <tr id="activity-notification-settings-mentions">
    286                 <td>&nbsp;</td>
    287                 <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
    288                 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
    289                 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
    290             </tr>
     291            <?php if ( bp_activity_do_mentions() ) : ?>
     292                <tr id="activity-notification-settings-mentions">
     293                    <td>&nbsp;</td>
     294                    <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
     295                    <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
     296                    <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
     297                </tr>
     298            <?php endif; ?>
     299
    291300            <tr id="activity-notification-settings-replies">
    292301                <td>&nbsp;</td>
Note: See TracChangeset for help on using the changeset viewer.