- Timestamp:
- 03/18/2023 09:42:31 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php
r13310 r13437 251 251 252 252 return (int) bp_get_user_meta( $user_id, '_bp_nouveau_restrict_invites_to_friends' ); 253 }254 255 /**256 * Outputs the group creation numbered steps navbar257 *258 * @since 3.0.0259 *260 * @todo This output isn't localised correctly.261 */262 function bp_nouveau_group_creation_tabs() {263 $bp = buddypress();264 265 if ( ! is_array( $bp->groups->group_creation_steps ) ) {266 return;267 }268 269 if ( ! bp_get_groups_current_create_step() ) {270 $keys = array_keys( $bp->groups->group_creation_steps );271 $bp->groups->current_create_step = array_shift( $keys );272 }273 274 $counter = 1;275 276 foreach ( (array) $bp->groups->group_creation_steps as $slug => $step ) {277 $is_enabled = bp_are_previous_group_creation_steps_complete( $slug ); ?>278 279 <li<?php if ( bp_get_groups_current_create_step() === $slug ) : ?> class="current"<?php endif; ?>>280 <?php if ( $is_enabled ) : ?>281 <a href="<?php echo esc_url( bp_groups_directory_permalink() . 'create/step/' . $slug . '/' ); ?>">282 <?php echo (int) $counter; ?> <?php echo esc_html( $step['name'] ); ?>283 </a>284 <?php else : ?>285 <?php echo (int) $counter; ?>. <?php echo esc_html( $step['name'] ); ?>286 <?php endif ?>287 </li>288 <?php289 $counter++;290 }291 292 unset( $is_enabled );293 294 /**295 * Fires at the end of the creation of the group tabs.296 *297 * @since 1.0.0298 */299 do_action( 'groups_creation_tabs' );300 253 } 301 254
Note: See TracChangeset
for help on using the changeset viewer.