Ejemplo n.º 1
0
											<input type="submit" value="<?php 
        _e('Next Step', 'vibe');
        ?>
"
											       id="group-creation-next" name="save"/>

										<?php 
    }
    ?>

										<?php 
    /* Create Button */
    ?>
										<?php 
    if (bp_is_first_group_creation_step()) {
        ?>

											<input type="submit"
											       value="<?php 
        _e('Create Group and Continue', 'vibe');
        ?>
"
											       id="group-creation-create" name="save"/>

										<?php 
    }
    ?>

										<?php 
    /* Finish Button */
function bp_is_group_creation_step($step_slug)
{
    global $bp;
    /* Make sure we are in the groups component */
    if (!bp_is_groups_component() || !bp_is_current_action('create')) {
        return false;
    }
    /* If this the first step, we can just accept and return true */
    $keys = array_keys($bp->groups->group_creation_steps);
    if (!bp_action_variable(1) && array_shift($keys) == $step_slug) {
        return true;
    }
    /* Before allowing a user to see a group creation step we must make sure previous steps are completed */
    if (!bp_is_first_group_creation_step()) {
        if (!bp_are_previous_group_creation_steps_complete($step_slug)) {
            return false;
        }
    }
    /* Check the current step against the step parameter */
    if (bp_is_action_variable($step_slug)) {
        return true;
    }
    return false;
}
Ejemplo n.º 3
0
function bp_is_group_creation_step( $step_slug ) {
	global $bp;

	/* Make sure we are in the groups component */
	if ( $bp->current_component != BP_GROUPS_SLUG || 'create' != $bp->current_action )
		return false;

	/* If this the first step, we can just accept and return true */
	if ( !$bp->action_variables[1] && array_shift( array_keys( $bp->groups->group_creation_steps ) ) == $step_slug )
		return true;

	/* Before allowing a user to see a group creation step we must make sure previous steps are completed */
	if ( !bp_is_first_group_creation_step() ) {
		if ( !bp_are_previous_group_creation_steps_complete( $step_slug ) )
			return false;
	}

	/* Check the current step against the step parameter */
	if ( $bp->action_variables[1] == $step_slug )
		return true;

	return false;
}