Changeset 7350 for trunk/bp-groups/bp-groups-template.php
- Timestamp:
- 08/19/2013 06:26:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r7349 r7350 2205 2205 return false; 2206 2206 2207 if ( !bp_get_groups_current_create_step() ) 2208 $bp->groups->current_create_step = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 2207 if ( !bp_get_groups_current_create_step() ) { 2208 $keys = array_keys( $bp->groups->group_creation_steps ); 2209 $bp->groups->current_create_step = array_shift( $keys ); 2210 } 2209 2211 2210 2212 $counter = 1; … … 2234 2236 global $bp; 2235 2237 2236 if ( !bp_action_variable( 1 ) ) 2237 $bp->action_variables[1] = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 2238 if ( !bp_action_variable( 1 ) ) { 2239 $keys = array_keys( $bp->groups->group_creation_steps ); 2240 $bp->action_variables[1] = array_shift( $keys ); 2241 } 2238 2242 2239 2243 return apply_filters( 'bp_get_group_creation_form_action', trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_action_variable( 1 ) ) ); … … 2248 2252 2249 2253 /* If this the first step, we can just accept and return true */ 2250 if ( !bp_action_variable( 1 ) && array_shift( array_keys( $bp->groups->group_creation_steps ) ) == $step_slug ) 2254 $keys = array_keys( $bp->groups->group_creation_steps ); 2255 if ( !bp_action_variable( 1 ) && array_shift( $keys ) == $step_slug ) 2251 2256 return true; 2252 2257 … … 2290 2295 2291 2296 /* If this is the first group creation step, return true */ 2292 if ( array_shift( array_keys( $bp->groups->group_creation_steps ) ) == $step_slug ) 2297 $keys = array_keys( $bp->groups->group_creation_steps ); 2298 if ( array_shift( $keys ) == $step_slug ) 2293 2299 return true; 2294 2300 … … 2434 2440 global $bp; 2435 2441 2436 $last_step = array_pop( array_keys( $bp->groups->group_creation_steps ) ); 2442 $keys = array_keys( $bp->groups->group_creation_steps ); 2443 $last_step = array_pop( $keys ); 2437 2444 2438 2445 if ( $last_step == bp_get_groups_current_create_step() ) … … 2445 2452 global $bp; 2446 2453 2447 $first_step = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 2454 $keys = array_keys( $bp->groups->group_creation_steps ); 2455 $first_step = array_shift( $keys ); 2448 2456 2449 2457 if ( $first_step == bp_get_groups_current_create_step() )
Note: See TracChangeset
for help on using the changeset viewer.