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

	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.