diff --git src/bp-groups/bp-groups-notifications.php src/bp-groups/bp-groups-notifications.php
index 6b484778c..0db8ba228 100644
|
|
function groups_format_notifications( $action, $item_id, $secondary_item_id, $to |
614 | 614 | * @param string $text Notification content. |
615 | 615 | * @param string $notification_link The permalink for notification. |
616 | 616 | */ |
617 | | return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $total_items, $group->name ); |
| 617 | return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link ); |
618 | 618 | } else { |
619 | 619 | |
620 | 620 | /** |
diff --git src/bp-notifications/actions/bulk-manage.php src/bp-notifications/actions/bulk-manage.php
index 02b03068a..138f6b6e5 100644
|
|
function bp_notifications_action_bulk_manage() { |
63 | 63 | break; |
64 | 64 | } |
65 | 65 | |
| 66 | // URL to redirect to. |
| 67 | if ( bp_is_current_action( 'unread' ) ) { |
| 68 | $redirect = bp_get_notifications_unread_permalink( bp_displayed_user_id() ); |
| 69 | } elseif ( bp_is_current_action( 'read' ) ) { |
| 70 | $redirect = bp_get_notifications_read_permalink( bp_displayed_user_id() ); |
| 71 | } |
| 72 | |
66 | 73 | // Redirect. |
67 | | bp_core_redirect( bp_displayed_user_domain() . bp_get_notifications_slug() . '/' . bp_current_action() . '/' ); |
| 74 | bp_core_redirect( $redirect ); |
68 | 75 | } |
69 | | add_action( 'bp_actions', 'bp_notifications_action_bulk_manage' ); |
70 | | No newline at end of file |
| 76 | add_action( 'bp_actions', 'bp_notifications_action_bulk_manage' ); |
diff --git src/bp-notifications/actions/delete.php src/bp-notifications/actions/delete.php
index 42aede5dc..c389d1c8c 100644
|
|
function bp_notifications_action_delete() { |
38 | 38 | bp_core_add_message( __( 'There was a problem deleting that notification.', 'buddypress' ), 'error' ); |
39 | 39 | } |
40 | 40 | |
| 41 | // URL to redirect to. |
| 42 | if ( bp_is_current_action( 'unread' ) ) { |
| 43 | $redirect = bp_get_notifications_unread_permalink( bp_displayed_user_id() ); |
| 44 | } elseif ( bp_is_current_action( 'read' ) ) { |
| 45 | $redirect = bp_get_notifications_read_permalink( bp_displayed_user_id() ); |
| 46 | } |
| 47 | |
41 | 48 | // Redirect. |
42 | | bp_core_redirect( bp_displayed_user_domain() . bp_get_notifications_slug() . '/' . bp_current_action() . '/' ); |
| 49 | bp_core_redirect( $redirect ); |
43 | 50 | } |
44 | | add_action( 'bp_actions', 'bp_notifications_action_delete' ); |
45 | | No newline at end of file |
| 51 | add_action( 'bp_actions', 'bp_notifications_action_delete' ); |
diff --git src/bp-notifications/bp-notifications-template.php src/bp-notifications/bp-notifications-template.php
index 38552434e..c13e80ac4 100644
|
|
function bp_notifications_read_permalink( $user_id = 0 ) { |
157 | 157 | * @param string $retval Permalink for the read notifications. |
158 | 158 | * @param int $user_id The user ID. |
159 | 159 | */ |
160 | | return apply_filters( 'bp_get_notifications_unread_permalink', $retval, $user_id ); |
| 160 | return apply_filters( 'bp_get_notifications_read_permalink', $retval, $user_id ); |
161 | 161 | } |
162 | 162 | |
163 | 163 | /** The Loop ******************************************************************/ |
diff --git src/bp-notifications/screens/read.php src/bp-notifications/screens/read.php
index 49ff6d4da..3e7e17f57 100644
|
|
function bp_notifications_action_mark_unread() { |
63 | 63 | } |
64 | 64 | |
65 | 65 | // Redirect. |
66 | | bp_core_redirect( bp_displayed_user_domain() . bp_get_notifications_slug() . '/read/' ); |
| 66 | bp_core_redirect( bp_get_notifications_read_permalink( bp_displayed_user_id() ) ); |
67 | 67 | } |
68 | | add_action( 'bp_actions', 'bp_notifications_action_mark_unread' ); |
69 | | No newline at end of file |
| 68 | add_action( 'bp_actions', 'bp_notifications_action_mark_unread' ); |
diff --git src/bp-notifications/screens/unread.php src/bp-notifications/screens/unread.php
index d324afa93..5cd55d7b0 100644
|
|
function bp_notifications_action_mark_read() { |
63 | 63 | } |
64 | 64 | |
65 | 65 | // Redirect. |
66 | | bp_core_redirect( bp_displayed_user_domain() . bp_get_notifications_slug() . '/unread/' ); |
| 66 | bp_core_redirect( bp_get_notifications_unread_permalink( bp_displayed_user_id() ) ); |
67 | 67 | } |
68 | | add_action( 'bp_actions', 'bp_notifications_action_mark_read' ); |
69 | | No newline at end of file |
| 68 | add_action( 'bp_actions', 'bp_notifications_action_mark_read' ); |