Changeset 3728 for trunk/bp-groups/bp-groups-templatetags.php
- Timestamp:
- 01/18/2011 12:53:31 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups/bp-groups-templatetags.php (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-templatetags.php
r3685 r3728 351 351 $group =& $groups_template->group; 352 352 353 return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups-> slug . '/' . $group->slug . '/' );353 return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group->slug . '/' ); 354 354 } 355 355 … … 363 363 $group =& $groups_template->group; 364 364 365 return apply_filters( 'bp_get_group_admin_permalink', $bp->root_domain . '/' . $bp->groups-> slug . '/' . $group->slug . '/admin' );365 return apply_filters( 'bp_get_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->root_slug . '/' . $group->slug . '/admin' ); 366 366 } 367 367 … … 548 548 global $bp; 549 549 550 if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug|| $bp->current_action != $bp->activity->slug )550 if ( !$bp->is_single_item || !bp_is_current_component( $bp->groups->slug ) || $bp->current_action != $bp->activity->slug ) 551 551 return false; 552 552 … … 930 930 ?> 931 931 <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?> 932 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/<?php echo $group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>932 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li> 933 933 <?php } ?> 934 934 … … 937 937 return false; 938 938 ?> 939 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/<?php echo $group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>940 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/<?php echo $group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>941 <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/<?php echo $group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>939 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li> 940 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li> 941 <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li> 942 942 943 943 <?php if ( $groups_template->group->status == 'private' ) : ?> 944 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/<?php echo $group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>944 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li> 945 945 <?php endif; ?> 946 946 947 947 <?php do_action( 'groups_admin_tabs', $current_tab, $group->slug ) ?> 948 948 949 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/<?php echo $group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>949 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/<?php echo $group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li> 950 950 <?php 951 951 } … … 1620 1620 $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?> 1621 1621 1622 <li<?php if ( $bp->groups->current_create_step == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo $bp->root_domain . '/' . $bp->groups-> slug ?>/create/step/<?php echo $slug ?>/"><?php else: ?><span><?php endif; ?><?php echo $counter ?>. <?php echo $step['name'] ?><?php if ( $is_enabled ) : ?></a><?php else: ?></span><?php endif ?></li><?php1622 <li<?php if ( $bp->groups->current_create_step == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo $bp->root_domain . '/' . $bp->groups->root_slug ?>/create/step/<?php echo $slug ?>/"><?php else: ?><span><?php endif; ?><?php echo $counter ?>. <?php echo $step['name'] ?><?php if ( $is_enabled ) : ?></a><?php else: ?></span><?php endif ?></li><?php 1623 1623 $counter++; 1624 1624 } … … 1644 1644 $bp->action_variables[1] = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 1645 1645 1646 return apply_filters( 'bp_get_group_creation_form_action', $bp->root_domain . '/' . $bp->groups-> slug . '/create/step/' . $bp->action_variables[1] );1646 return apply_filters( 'bp_get_group_creation_form_action', $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->action_variables[1] ); 1647 1647 } 1648 1648 … … 1651 1651 1652 1652 /* Make sure we are in the groups component */ 1653 if ( $bp->current_component != BP_GROUPS_SLUG|| 'create' != $bp->current_action )1653 if ( !bp_is_current_component( $bp->groups->slug ) || 'create' != $bp->current_action ) 1654 1654 return false; 1655 1655 … … 1930 1930 global $bp; 1931 1931 1932 if ( $bp->current_component != BP_GROUPS_SLUG|| 'admin' != $bp->current_action )1932 if ( !bp_is_current_component( $bp->groups->slug ) || 'admin' != $bp->current_action ) 1933 1933 return false; 1934 1934 … … 1947 1947 1948 1948 if ( $bp->groups->current_group->avatar_full ) { ?> 1949 1949 1950 <img src="<?php echo esc_attr( $bp->groups->current_group->avatar_full ) ?>" alt="<?php _e( 'Group Avatar', 'buddypress' ) ?>" class="avatar" /> 1951 1950 1952 <?php } else { ?> 1953 1951 1954 <img src="<?php echo $bp->groups->image_base . '/none.gif' ?>" alt="<?php _e( 'No Group Avatar', 'buddypress' ) ?>" class="avatar" /> 1955 1952 1956 <?php } 1953 1957 } … … 2041 2045 'next_text' => '→', 2042 2046 'mid_size' => 1 2043 ) );2047 ) ); 2044 2048 } 2045 2049 … … 2060 2064 function rewind_requests() { 2061 2065 $this->current_request = -1; 2062 if ( $this->request_count > 0 ) { 2066 2067 if ( $this->request_count > 0 ) 2063 2068 $this->request = $this->requests[0]; 2064 }2065 2069 } 2066 2070 … … 2095 2099 'group_id' => $groups_template->group->id, 2096 2100 'per_page' => 10, 2097 'max' => false2101 'max' => false 2098 2102 ); 2099 2103 … … 2202 2206 function rewind_invites() { 2203 2207 $this->current_invite = -1; 2204 if ( $this->invite_count > 0 ) {2208 if ( $this->invite_count > 0 ) 2205 2209 $this->invite = $this->invites[0]; 2206 }2207 2210 } 2208 2211 … … 2247 2250 2248 2251 if ( !$group_id ) { 2249 / * Backwards compatibility */2252 // Backwards compatibility 2250 2253 if ( !empty( $bp->groups->current_group ) ) 2251 2254 $group_id = $bp->groups->current_group->id; 2255 2252 2256 if ( !empty( $bp->groups->new_group_id ) ) 2253 2257 $group_id = $bp->groups->new_group_id;
Note: See TracChangeset
for help on using the changeset viewer.