bp_process_create_group_admin()

Saving the data of newly create group from the backend.

Description

Source

File: bp-groups/bp-groups-admin.php

945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
function bp_process_create_group_admin() {
 
    if ( !current_user_can( 'manage_options' ) ) {
        wp_die( 'You are not allowed to be on this page.' );
    }
    // Check that nonce field
    check_admin_referer( 'bp_create_group_form_nonce' );
 
    $new_group_id = groups_create_group( array( 'group_id' => 0, 'name' => $_POST['bp-groups-name'], 'description' => $_POST['bp-groups-description'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['bp-groups-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) );
 
    wp_safe_redirect( add_query_arg([
        'page' => 'bp-groups',
        'gid' => $new_group_id,
        'action' => 'edit',
    ], admin_url( 'admin.php' ) ));
    exit();
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.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.