Changeset 9941 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 06/12/2015 02:55:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r9940 r9941 4778 4778 * @since BuddyPress (1.1.0) 4779 4779 * 4780 * @return bool True if yes, False if no 4781 */ 4782 function bp_is_last_group_creation_step() { 4780 * @param string $step Step to compare 4781 * @return bool True if yes, False if no 4782 */ 4783 function bp_is_last_group_creation_step( $step = '' ) { 4784 4785 // Use current step, if no step passed 4786 if ( empty( $step ) ) { 4787 $step = bp_get_groups_current_create_step(); 4788 } 4789 4790 // Get the last step 4783 4791 $bp = buddypress(); 4784 4792 $steps = array_keys( $bp->groups->group_creation_steps ); 4785 $step = array_pop( $steps ); 4786 $retval = ( $step === bp_get_groups_current_create_step() ); 4793 $l_step = array_pop( $steps ); 4794 4795 // Compare last step to step 4796 $retval = ( $l_step === $step ); 4787 4797 4788 4798 return (bool) apply_filters( 'bp_is_last_group_creation_step', $retval, $steps, $step ); … … 4794 4804 * @since BuddyPress (1.1.0) 4795 4805 * 4796 * @return bool True if yes, False if no 4797 */ 4798 function bp_is_first_group_creation_step() { 4806 * @param string $step Step to compare 4807 * @return bool True if yes, False if no 4808 */ 4809 function bp_is_first_group_creation_step( $step = '' ) { 4810 4811 // Use current step, if no step passed 4812 if ( empty( $step ) ) { 4813 $step = bp_get_groups_current_create_step(); 4814 } 4815 4816 // Get the first step 4799 4817 $bp = buddypress(); 4800 4818 $steps = array_keys( $bp->groups->group_creation_steps ); 4801 $step = array_shift( $steps ); 4802 $retval = ( $step === bp_get_groups_current_create_step() ); 4819 $f_step = array_shift( $steps ); 4820 4821 // Compare first step to step 4822 $retval = ( $f_step === $step ); 4803 4823 4804 4824 return (bool) apply_filters( 'bp_is_first_group_creation_step', $retval, $steps, $step ); … … 4866 4886 * 4867 4887 * @param array $items Array of friends. 4868 */ 4888 */ 4869 4889 $invitable_friends = apply_filters( 'bp_get_new_group_invite_friend_list', $items, $r, $args ); 4870 4890
Note: See TracChangeset
for help on using the changeset viewer.