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-groups/bp-groups-notifications.php

    r5215 r5296  
    1919        $to = $ud->user_email;
    2020
    21         $group_link = site_url( bp_get_groups_root_slug(). '/' . $group->slug );
    22         $settings_link = bp_core_get_user_domain( $user_id ) . bp_get_settings_slug() . '/notifications/';
     21        $group_link    = site_url( bp_get_groups_root_slug(). '/' . $group->slug );
     22        $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     23        $settings_link = bp_core_get_user_domain( $user_id ) . $settings_slug . '/notifications/';
    2324
    2425        $message = sprintf( __(
     
    6061
    6162    $group_requests = bp_get_group_permalink( $group ) . 'admin/membership-requests';
    62     $profile_link = bp_core_get_user_domain( $requesting_user_id );
    63     $settings_link = bp_core_get_user_domain( $requesting_user_id ) . bp_get_settings_slug() . '/notifications/';
     63    $profile_link   = bp_core_get_user_domain( $requesting_user_id );
     64    $settings_slug  = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     65    $settings_link  = bp_core_get_user_domain( $requesting_user_id ) . $settings_slug . '/notifications/';
    6466
    6567    // Set up and send the message
     
    109111    $ud = bp_core_get_core_userdata($requesting_user_id);
    110112
    111     $group_link = bp_get_group_permalink( $group );
    112     $settings_link = bp_core_get_user_domain( $requesting_user_id ) . bp_get_settings_slug() . '/notifications/';
     113    $group_link   = bp_get_group_permalink( $group );
     114    $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     115    $settings_link = bp_core_get_user_domain( $requesting_user_id ) . $settings_slug . '/notifications/';
    113116
    114117    // Set up and send the message
     
    166169        return false;
    167170
    168     $group = new BP_Groups_Group( $group_id );
    169     $ud = bp_core_get_core_userdata($user_id);
    170 
    171     $group_link = bp_get_group_permalink( $group );
    172     $settings_link = bp_core_get_user_domain( $user_id ) . bp_get_settings_slug() . '/notifications/';
     171    $group         = new BP_Groups_Group( $group_id );
     172    $ud            = bp_core_get_core_userdata($user_id);
     173    $group_link    = bp_get_group_permalink( $group );
     174    $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
     175    $settings_link = bp_core_get_user_domain( $user_id ) . $settings_slug . '/notifications/';
    173176
    174177    // Set up and send the message
Note: See TracChangeset for help on using the changeset viewer.