Changeset 8616
- Timestamp:
- 07/15/2014 09:59:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-notifications.php
r8568 r8616 129 129 130 130 if ( (int) $total_items > 1 ) { 131 $text = sprintf( __( 'You have %d new messages', 'buddypress' ), (int) $total_items );131 $text = sprintf( __( 'You have %d new messages', 'buddypress' ), (int) $total_items ); 132 132 $filter = 'bp_messages_multiple_new_message_notification'; 133 133 } else { … … 135 135 $message = new BP_Messages_Message( $item_id ); 136 136 $thread_id = $message->thread_id; 137 138 $link = bp_get_message_thread_view_link( $thread_id ); 137 $link = ( ! empty( $thread_id ) ) 138 ? bp_get_message_thread_view_link( $thread_id ) 139 : false; 139 140 140 141 if ( ! empty( $secondary_item_id ) ) { … … 148 149 149 150 if ( 'string' === $format ) { 150 $return = apply_filters( $filter, '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $link, $item_id, $secondary_item_id ); 151 if ( ! empty( $link ) ) { 152 $retval = '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $text ) . '</a>'; 153 } else { 154 $retval = esc_html( $text ); 155 } 156 $return = apply_filters( $filter, $retval, (int) $total_items, $text, $link, $item_id, $secondary_item_id ); 151 157 } else { 152 158 $return = apply_filters( $filter, array(
Note: See TracChangeset
for help on using the changeset viewer.