bp_are_previous_group_creation_steps_complete( string $step_slug )
Check all previous group creation steps are complete.
Description
Parameters
- $step_slug
-
(Required)
Return
(bool)
Source
File: bp-groups/bp-groups-template.php
5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 | function bp_are_previous_group_creation_steps_complete( $step_slug ) { $bp = buddypress(); // If this is the first group creation step, return true. $keys = array_keys ( $bp ->groups->group_creation_steps ); if ( array_shift ( $keys ) == $step_slug ) { return true; } reset( $bp ->groups->group_creation_steps ); $previous_steps = array (); // Get previous steps. foreach ( ( array ) $bp ->groups->group_creation_steps as $slug => $name ) { if ( $slug === $step_slug ) { break ; } $previous_steps [] = $slug ; } return bp_is_group_creation_step_complete( $previous_steps ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.