Changeset 11527
- Timestamp:
- 04/07/2017 07:05:55 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r11447 r11527 996 996 997 997 /** 998 * Output an HTML-formatted link for the current group in the loop. 999 * 1000 * @since 2.9.0 1001 * 1002 * @param BP_Groups_Group|null $group Optional. Group object. 1003 * Default: current group in loop. 1004 */ 1005 function bp_group_link( $group = null ) { 1006 echo bp_get_group_link( $group ); 1007 } 1008 /** 1009 * Return an HTML-formatted link for the current group in the loop. 1010 * 1011 * @since 2.9.0 1012 * 1013 * @param BP_Groups_Group|null $group Optional. Group object. 1014 * Default: current group in loop. 1015 * @return string 1016 */ 1017 function bp_get_group_link( $group = null ) { 1018 global $groups_template; 1019 1020 if ( empty( $group ) ) { 1021 $group =& $groups_template->group; 1022 } 1023 1024 $link = sprintf( 1025 '<a href="%s" class="bp-group-home-link %s-home-link">%s</a>', 1026 esc_url( bp_get_group_permalink( $group ) ), 1027 esc_attr( bp_get_group_slug( $group ) ), 1028 esc_html( bp_get_group_name( $group ) ) 1029 ); 1030 1031 /** 1032 * Filters the HTML-formatted link for the current group in the loop. 1033 * 1034 * @since 2.9.0 1035 * 1036 * @param string $value HTML-formatted link for the 1037 * current group in the loop. 1038 * @param BP_Groups_Group $group The current group object. 1039 */ 1040 return apply_filters( 'bp_get_group_link', $link, $group ); 1041 } 1042 1043 /** 998 1044 * Output the permalink for the admin section of the current group in the loop. 999 1045 *
Note: See TracChangeset
for help on using the changeset viewer.