Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/18/2013 12:36:43 AM (14 years ago)
Author:
boonebgorges
Message:

Only show the 'to disable' notice in emails if Settings is enabled

Unless Settings is enabled, these links will 404. This is not exactly a
regression, but it has become much more visible in BP 1.7, since the Settings
component is no longer enabled by default.

Fixes #4923

Props r-a-y

File:
1 edited

Legend:

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

    r6589 r6917  
    8888', 'buddypress' ), $requesting_user_name, $group->name, $group_requests, $requesting_user_name, $profile_link );
    8989
    90         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     90        // Only show the disable notifications line if the settings component is enabled
     91        if ( bp_is_active( 'settings' ) ) {
     92                $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     93        }
    9194
    9295        /* Send the message */
    … …  
    143146        }
    144147
    145         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     148        // Only show the disable notifications line if the settings component is enabled
     149        if ( bp_is_active( 'settings' ) ) {
     150                $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     151        }
    146152
    147153        /* Send the message */
    … …  
    188194', 'buddypress' ), $promoted_to, $group->name, $group_link );
    189195
    190         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     196        // Only show the disable notifications line if the settings component is enabled
     197        if ( bp_is_active( 'settings' ) ) {
     198                $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     199        }
    191200
    192201        /* Send the message */
    … …  
    241250', 'buddypress' ), $inviter_name, $group->name, $invites_link, $group_link, $inviter_name, $inviter_link );
    242251
    243                 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     252                // Only show the disable notifications line if the settings component is enabled
     253                if ( bp_is_active( 'settings' ) ) {
     254                        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
     255                }
    244256
    245257                /* Send the message */
Note: See TracChangeset for help on using the changeset viewer.