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
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.