PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 3.0.0
Taskbuilder – Project Management & Task Management Tool With Kanban Board v3.0.0
6.0.5 6.0.2 6.0.3 6.0.4 6.0.1 6.0.0 5.0.8 5.0.9 4.0.9 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 All 57 releases
taskbuilder / includes / admin / projects / wppm_get_delete_project.php

wppm_get_delete_project.php in Taskbuilder – Project Management & Task Management Tool With Kanban Board 3.0.0, at includes/admin/projects/wppm_get_delete_project.php

31 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5 global $current_user,$wppmfunction,$wpdb;
6 $id = isset($_POST['id']) ? sanitize_text_field($_POST['id']) : '0';
7 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_project_permission('delete_project',$id))) {exit;}
8 ob_start();
9 ?>
10 <form id="frm_delete_project" method="post">
11 <div class="form-group">
12 <p><?php echo esc_html_e('Are you sure to delete this project?','taskbuilder');?></p>
13 </div>
14 <input type="hidden" name="action" value="wppm_set_delete_project" />
15 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_delete_project' ) ); ?>">
16 <input type="hidden" name="project_id" value="<?php echo htmlentities(esc_attr($id))?>" />
17 </form>
18 <?php
19 $body = ob_get_clean();
20 ob_start();
21 ?>
22 <button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Cancel','taskbuilder');?></button>
23 <button type="button" class="btn wppm_popup_action" type="submit" onclick="wppm_set_delete_project();"><?php echo esc_html_e('Confirm','taskbuilder');?></button>
24 <?php
25 $footer = ob_get_clean();
26 $response = array(
27 'body' => $body,
28 'footer' => $footer
29 );
30 echo json_encode($response);
31