bp_is_last_group_creation_step( string $step = '' )
Is the user looking at the last step in the group creation process.
Description
Parameters
- $step
-
(Optional) Step to compare.
Default value: ''
Return
(bool) True if yes, False if no
Source
File: bp-groups/bp-groups-template.php
function bp_is_last_group_creation_step( $step = '' ) { // Use current step, if no step passed. if ( empty( $step ) ) { $step = bp_get_groups_current_create_step(); } // Get the last step. $bp = buddypress(); $steps = array_keys( $bp->groups->group_creation_steps ); $l_step = array_pop( $steps ); // Compare last step to step. $retval = ( $l_step === $step ); /** * Filters whether or not user is looking at last step in group creation process. * * @since BuddyPress 2.4.0 * * @param bool $retval Whether or not we are looking at last step. * @param array $steps Array of steps from the group creation process. * @param string $step Step to compare. */ return (bool) apply_filters( 'bp_is_last_group_creation_step', $retval, $steps, $step ); }
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.