xprofile_admin_delete_group_screen( $group_id )

Display the delete confirmation screen of profile data groups.


Source Source

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

function xprofile_admin_delete_group_screen( $group_id ) {

	if ( ! bp_current_user_can( 'bp_moderate' ) ) {
		die( '-1' );
	}

	$group = new BP_XProfile_Group( $group_id );

	$base_url = remove_query_arg( array( 'mode', 'group_id', '_wpnonce' ), $_SERVER['REQUEST_URI'] ); ?>

	<div class="wrap">
		<h1 class="wp-heading-inline"><?php esc_html_e( 'Delete Field Group', 'buddypress' ) ?></h1>
		<hr class="wp-header-end">

		<p><?php esc_html_e( 'You are about to delete the following field group:', 'buddypress' ) ?></p>

		<ul class="bp-xprofile-delete-group-list">
			<li><?php echo esc_html( $group->name ); ?></li>
		</ul>

		<p><strong><?php esc_html_e( 'This action cannot be undone.', 'buddypress' ) ?></strong></p>

		<a class="button-primary" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'mode' => 'do_delete_group', 'group_id' => $group_id ), $base_url ), 'bp_xprofile_delete_group' ) ); ?>"><?php esc_html_e( 'Delete Permanently', 'buddypress' ) ?></a>
		<a class="button" href="<?php echo esc_attr( $base_url ); ?>"><?php esc_html_e( 'Cancel', 'buddypress' ) ?></a>
	</div>

	<?php
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.