Changeset 9942
- Timestamp:
- 06/12/2015 03:09:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r9941 r9942 4711 4711 } 4712 4712 4713 /** 4714 * Escape & output the URL to the previous group creation step 4715 * 4716 * @since BuddyPress (1.1.0) 4717 */ 4713 4718 function bp_group_creation_previous_link() { 4714 echo bp_get_group_creation_previous_link(); 4715 } 4719 echo esc_url( bp_get_group_creation_previous_link() ); 4720 } 4721 /** 4722 * Return the URL to the previous group creation step 4723 * 4724 * @since BuddyPress (1.1.0) 4725 * 4726 * @return string 4727 */ 4716 4728 function bp_get_group_creation_previous_link() { 4717 $bp = buddypress(); 4718 4719 foreach ( (array) $bp->groups->group_creation_steps as $slug => $name ) { 4729 $bp = buddypress(); 4730 $steps = array_keys( $bp->groups->group_creation_steps ); 4731 4732 // Loop through steps 4733 foreach ( $steps as $slug ) { 4734 4735 // Break when the current step is found 4720 4736 if ( bp_is_action_variable( $slug ) ) { 4721 4737 break; 4722 4738 } 4723 4739 4740 // Add slug to previous steps 4724 4741 $previous_steps[] = $slug; 4725 4742 } 4726 4743 4744 // Generate the URL for the previous step 4745 $group_directory = bp_get_groups_directory_permalink(); 4746 $create_step = 'create/step/'; 4747 $previous_step = array_pop( $previous_steps ); 4748 $url = trailingslashit( $group_directory . $create_step . $previous_step ); 4749 4727 4750 /** 4728 4751 * Filters the permalink for the previous step with the group creation process. … … 4732 4755 * @param string $value Permalink for the previous step. 4733 4756 */ 4734 return apply_filters( 'bp_get_group_creation_previous_link', trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . array_pop( $previous_steps ) ));4757 return apply_filters( 'bp_get_group_creation_previous_link', $url ); 4735 4758 } 4736 4759
Note: See TracChangeset
for help on using the changeset viewer.