bp_get_group_creation_previous_link()

Return the URL to the previous group creation step

Description

Return

(string)

Source

File: bp-groups/bp-groups-template.php

5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
function bp_get_group_creation_previous_link() {
    $bp    = buddypress();
    $steps = array_keys( $bp->groups->group_creation_steps );
 
    // Loop through steps.
    foreach ( $steps as $slug ) {
 
        // Break when the current step is found.
        if ( bp_is_action_variable( $slug ) ) {
            break;
        }
 
        // Add slug to previous steps.
        $previous_steps[] = $slug;
    }
 
    // Generate the URL for the previous step.
    $group_directory = bp_get_groups_directory_permalink();
    $create_step     = 'create/step/';
    $previous_step   = array_pop( $previous_steps );
    $url             = trailingslashit( $group_directory . $create_step . $previous_step );
 
    /**
     * Filters the permalink for the previous step with the group creation process.
     *
     * @since BuddyPress 1.1.0
     *
     * @param string $url Permalink for the previous step.
     */
    return apply_filters( 'bp_get_group_creation_previous_link', $url );
}

Changelog

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.