# taskbuilder/3.0.4/includes/admin/tasks/wppm_get_delete_task.php

Taskbuilder – Project Management &amp; Task Management Tool With Kanban Board, version 3.0.4. 31 lines.

- Page: https://pluginprobe.com/plugins/taskbuilder/3.0.4/code/includes/admin/tasks/wppm_get_delete_task.php
- Raw: https://pluginprobe.com/plugins/taskbuilder/3.0.4/raw/includes/admin/tasks/wppm_get_delete_task.php
- Modified: 2024-05-01T13:10:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/taskbuilder/3.0.4/code/includes/admin/tasks/wppm_get_delete_task.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

global $current_user;
$id = isset($_POST['id']) ? sanitize_text_field($_POST['id']) : '';
ob_start();
?>
<form id="frm_delete_task">
    <div class="form-group">
        <p><?php echo esc_html_e('Are you sure to delete this task?','taskbuilder');?></p>
    </div>
    <input type="hidden" name="action" value="wppm_set_delete_task" />
    <input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce('wppm_set_delete_task')?>">
    <input type="hidden" name="task_id" value="<?php echo htmlentities(esc_attr($id))?>" />
</form>
<?php
$body = ob_get_clean();
ob_start();
?>
<button type="button" class="btn wppm_popup_close"  onclick="wppm_modal_close();"><?php echo esc_html_e('Cancel','taskbuilder');?></button>
<button type="button" class="btn wppm_popup_action" onclick="wppm_set_delete_task();"><?php echo esc_html_e('Confirm','taskbuilder');?></button>
<?php
$footer = ob_get_clean();
$response = array(
    'body'      => $body,
    'footer'    => $footer
);
echo json_encode($response);

```
