Ejemplo n.º 1
0
/**
 * Catch and process email sends.
 *
 * @since 1.1.0
 */
function invite_anyone_catch_send()
{
    global $bp;
    if (!bp_is_current_component($bp->invite_anyone->slug)) {
        return;
    }
    if (!bp_is_current_action('sent-invites')) {
        return;
    }
    if (!bp_is_action_variable('send', 0)) {
        return;
    }
    if (!invite_anyone_process_invitations(stripslashes_deep($_POST))) {
        bp_core_add_message(__('Sorry, there was a problem sending your invitations. Please try again.', 'invite-anyone'), 'error');
    }
    bp_core_redirect(bp_displayed_user_domain() . $bp->invite_anyone->slug . '/sent-invites');
}
Ejemplo n.º 2
0
/**
 * invite_anyone_screen_two()
 *
 */
function invite_anyone_screen_two()
{
    global $bp;
    if ($bp->current_component == $bp->invite_anyone->slug && $bp->current_action == 'sent-invites' && isset($bp->action_variables[0]) && $bp->action_variables[0] == 'send') {
        if (!invite_anyone_process_invitations($_POST)) {
            bp_core_add_message(__('Sorry, there was a problem sending your invitations. Please try again.', 'bp-invite-anyone'), 'error');
        }
    }
    do_action('invite_anyone_sent_invites_screen');
    /* bp_template_title ought to be used - bp-default needs to markup the template tag
    	and run a conditional check on template tag true to hide empty element markup or not
    	add_action( 'bp_template_title', 'invite_anyone_screen_two_title' );
    	*/
    add_action('bp_template_content', 'invite_anyone_screen_two_content');
    bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
}