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
6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 | 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.