예제 #1
0
/**
 * Select the appropriate Groups admin screen, and output it.
 *
 * @since 1.7.0
 */
function bp_groups_admin()
{
    // Decide whether to load the index or edit screen
    $doaction = bp_admin_list_table_current_bulk_action();
    // Display the single group edit screen
    if ('edit' == $doaction && !empty($_GET['gid'])) {
        bp_groups_admin_edit();
        // Display the group deletion confirmation screen
    } elseif ('delete' == $doaction && !empty($_GET['gid'])) {
        bp_groups_admin_delete();
        // Otherwise, display the groups index screen
    } else {
        bp_groups_admin_index();
    }
}
/**
 * Outputs the Groups component admin screens
 *
 * @since BuddyPress (1.7)
 */
function bp_groups_admin()
{
    // Decide whether to load the index or edit screen
    $doaction = !empty($_REQUEST['action']) ? $_REQUEST['action'] : '';
    // Display the single group edit screen
    if ('edit' == $doaction && !empty($_GET['gid'])) {
        bp_groups_admin_edit();
        // Display the group deletion confirmation screen
    } else {
        if ('delete' == $doaction && !empty($_GET['gid'])) {
            bp_groups_admin_delete();
            // Otherwise, display the groups index screen
        } else {
            bp_groups_admin_index();
        }
    }
}