Changeset 5941 for trunk/bp-groups/bp-groups-template.php
- Timestamp:
- 03/23/2012 06:01:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r5930 r5941 1994 1994 return false; 1995 1995 1996 if ( ! $bp->groups->current_create_step)1996 if ( !bp_get_groups_current_create_step() ) 1997 1997 $bp->groups->current_create_step = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 1998 1998 … … 2002 2002 $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?> 2003 2003 2004 <li<?php if ( $bp->groups->current_create_step== $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo bp_get_root_domain() . '/' . bp_get_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><?php2004 <li<?php if ( bp_get_groups_current_create_step() == $slug ) : ?> class="current"<?php endif; ?>><?php if ( $is_enabled ) : ?><a href="<?php echo bp_get_root_domain() . '/' . bp_get_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 2005 2005 $counter++; 2006 2006 } … … 2014 2014 global $bp; 2015 2015 2016 echo apply_filters( 'bp_group_creation_stage_title', '<span>— ' . $bp->groups->group_creation_steps[ $bp->groups->current_create_step]['name'] . '</span>' );2016 echo apply_filters( 'bp_group_creation_stage_title', '<span>— ' . $bp->groups->group_creation_steps[bp_get_groups_current_create_step()]['name'] . '</span>' ); 2017 2017 } 2018 2018 … … 2192 2192 } 2193 2193 2194 /** 2195 * Echoes the current group creation step 2196 * 2197 * @since 1.6 2198 */ 2199 function bp_groups_current_create_step() { 2200 echo bp_get_groups_current_create_step(); 2201 } 2202 /** 2203 * Returns the current group creation step. If none is found, returns an empty string 2204 * 2205 * @since 1.6 2206 * 2207 * @uses apply_filters() Filter bp_get_groups_current_create_step to modify 2208 * @return str $current_create_step 2209 */ 2210 function bp_get_groups_current_create_step() { 2211 global $bp; 2212 2213 if ( !empty( $bp->groups->current_create_step ) ) { 2214 $current_create_step = $bp->groups->current_create_step; 2215 } else { 2216 $current_create_step = ''; 2217 } 2218 2219 return apply_filters( 'bp_get_groups_current_create_step', $current_create_step ); 2220 } 2221 2194 2222 function bp_is_last_group_creation_step() { 2195 2223 global $bp; … … 2197 2225 $last_step = array_pop( array_keys( $bp->groups->group_creation_steps ) ); 2198 2226 2199 if ( $last_step == $bp->groups->current_create_step)2227 if ( $last_step == bp_get_groups_current_create_step() ) 2200 2228 return true; 2201 2229 … … 2208 2236 $first_step = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 2209 2237 2210 if ( $first_step == $bp->groups->current_create_step)2238 if ( $first_step == bp_get_groups_current_create_step() ) 2211 2239 return true; 2212 2240
Note: See TracChangeset
for help on using the changeset viewer.