Changeset 6737 for trunk/src/includes/replies/template.php
- Timestamp:
- 11/17/2017 05:04:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/template.php
r6735 r6737 1174 1174 } 1175 1175 1176 // Add links if not anonymous and existing user 1177 if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) { 1178 1179 // Empty array 1180 $links = array(); 1181 1182 // Assemble the links 1183 foreach ( $author_links as $link => $link_text ) { 1184 $link_class = ' class="bbp-author-' . esc_attr( $link ) . '"'; 1185 $links[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text ); 1186 } 1187 1188 // Role is not linked 1189 if ( true === $r['show_role'] ) { 1190 $links[] = bbp_get_reply_author_role( array( 'reply_id' => $reply_id ) ); 1191 } 1192 1193 // Juggle 1194 $author_links = $links; 1195 unset( $links ); 1176 // Empty array 1177 $links = array(); 1178 $sprint = empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) 1179 ? '<a href="%1$s"%2$s%3$s>%4$s</a>' 1180 : '<span %2$s%3$s>%4$s</span>'; 1181 1182 // Wrap each link 1183 foreach ( $author_links as $link => $link_text ) { 1184 $link_class = ' class="bbp-author-' . esc_attr( $link ) . '"'; 1185 $links[] = sprintf( $sprint, esc_url( $author_url ), $link_title, $link_class, $link_text ); 1196 1186 } 1187 1188 // Role is not linked 1189 if ( true === $r['show_role'] ) { 1190 $links[] = bbp_get_reply_author_role( array( 'reply_id' => $reply_id ) ); 1191 } 1192 1193 // Juggle 1194 $author_links = $links; 1195 unset( $links ); 1197 1196 1198 1197 // Filter sections
Note: See TracChangeset
for help on using the changeset viewer.