Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2011 06:49:14 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Add function_exists checks for bp_get_settings_slug() where needed. Fixes #3712.

File:
1 edited

Legend:

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

    r5217 r5296  
    5454        $poster_name = bp_core_get_user_displayname( $activity->user_id );
    5555
    56         $message_link = bp_activity_get_permalink( $activity_id );
    57         $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
     56        $message_link  = bp_activity_get_permalink( $activity_id );
     57        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     58        $settings_link = bp_core_get_user_domain( $receiver_user_id ) . $settings_slug . '/notifications/';
    5859
    5960        $poster_name = stripslashes( $poster_name );
     
    139140
    140141    if ( $original_activity->user_id != $commenter_id && 'no' != bp_get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) {
    141         $poster_name = bp_core_get_user_displayname( $commenter_id );
    142         $thread_link = bp_activity_get_permalink( $activity_id );
    143         $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . bp_get_settings_slug() . '/notifications/';
     142        $poster_name   = bp_core_get_user_displayname( $commenter_id );
     143        $thread_link   = bp_activity_get_permalink( $activity_id );
     144        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     145        $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . $settings_slug . '/notifications/';
    144146
    145147        $poster_name = stripslashes( $poster_name );
     
    184186
    185187    if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != bp_get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) {
    186         $poster_name = bp_core_get_user_displayname( $commenter_id );
    187         $thread_link = bp_activity_get_permalink( $activity_id );
    188         $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . bp_get_settings_slug() . '/notifications/';
     188        $poster_name   = bp_core_get_user_displayname( $commenter_id );
     189        $thread_link   = bp_activity_get_permalink( $activity_id );
     190        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     191        $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . $settings_slug . '/notifications/';
    189192
    190193        // Set up and send the message
Note: See TracChangeset for help on using the changeset viewer.