PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 6.0.6
Taskbuilder – Project Management & Task Management Tool With Kanban Board v6.0.6
6.0.6 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 All 58 releases
taskbuilder / includes / admin / projects / open_project / wppm_delete_proj_thread.php

wppm_delete_proj_thread.php in Taskbuilder – Project Management & Task Management Tool With Kanban Board 6.0.6, at includes/admin/projects/open_project/wppm_delete_proj_thread.php

37 lines 1.9 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 $wpdb,$wppmfunction,$current_user;
6 $proj_id = isset($_POST['proj_id']) ? intval(sanitize_text_field(wp_unslash($_POST['proj_id']))) : '' ;
7 $projectdata = $wppmfunction->get_project($proj_id);
8 $comment_id = isset($_POST['comment_id']) ? intval(sanitize_text_field(wp_unslash($_POST['comment_id']))) : 0 ;
9 $project_comment = $wppmfunction->get_proj_comment($comment_id);
10 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_proj_comment_permission('delete_proj_thread',$proj_id,$comment_id) || ($current_user->ID && $current_user->has_cap('wppm_admin')) || ($current_user->has_cap('wppm_manager') && $projectdata['created_by']==$current_user->ID ))) {exit;}
11 ob_start();
12 ?>
13 <form id="frm_delete_proj_thread">
14 <p><?php echo esc_html_e('Are you sure to delete this thread?','taskbuilder');?></p>
15 <input type="hidden" name="action" value="wppm_set_delete_proj_thread" />
16 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_delete_proj_thread' ) ); ?>">
17 <input type="hidden" name="proj_id" value="<?php echo (esc_attr($proj_id))?>" />
18 <input type="hidden" name="comment_id" value="<?php echo (esc_attr($comment_id))?>" />
19 </form>
20 <?php
21 $body = ob_get_clean();
22 ob_start();
23 ?>
24 <div class="row">
25 <div class="col-md-12" style="text-align: right;">
26 <button type="button" class="btn wppm_modal_close" onclick="wppm_modal_close()"><?php echo esc_html_e('Cancel','taskbuilder');?></button>
27 <button type="button" class="btn wppm_popup_action" onclick="wppm_set_delete_proj_thread(<?php echo esc_attr($proj_id); ?>);"><?php echo esc_html_e('Confirm','taskbuilder');?></button>
28 </div>
29 </div>
30 <?php
31 $footer = ob_get_clean();
32 $output = array(
33 'body' => $body,
34 'footer' => $footer
35 );
36 echo wp_json_encode($output);
37 ?>