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_set_edit_proj_thread.php

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

23 lines 1.7 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 if ( check_ajax_referer( 'wppm_set_edit_proj_thread', '_ajax_nonce', false ) != 1 ) {
7 wp_send_json_error( 'Unauthorised request!', 401 );
8 }
9 $proj_id = isset($_POST['proj_id']) ? absint(sanitize_text_field(wp_unslash($_POST['proj_id']))) : '' ;
10 $comment_id = isset($_POST['proj_comment_id']) ? absint(sanitize_text_field(wp_unslash($_POST['proj_comment_id']))) : '' ;
11 $proj_comment = $wppmfunction->get_proj_comment($comment_id);
12 if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_proj_comment_permission('edit_proj_comment',$proj_id,$comment_id))) {exit;}
13 $proj_comment_data = $wppmfunction->get_proj_comment($comment_id);
14 $old_comment_body = $proj_comment_data['body'];
15 $allowed_tags = array( 'br' => array(), 'abbr' => array('title' => array(),), 'p' => array(), 'strong' => array(), 'a' => array('href' => array(), 'title' => array(), 'rel'=> array(), 'target'=> array()),'em' =>array(),'span' =>array(), 'blockquote'=>array('cite' => array(),),'div' => array('class' => array(),'title' => array(),'style' => array(),),'ul'=>array(),'li'=>array(),'ol'=>array(),'img' => array( 'alt'=> array(),'class' => array(),'height' => array(),'src'=> array(),'width'=> array(),));
16 $new_proj_comment = '';
17 if ( !empty( $_POST['wppm_edit_proj_thread'] ) ) {
18 $raw = (wp_unslash($_POST['wppm_edit_proj_thread']));
19 $new_proj_comment = wp_kses( $raw, $allowed_tags );
20 }
21 if($new_proj_comment && $old_comment_body != $new_proj_comment ){
22 $wppmfunction->change_proj_comment($comment_id, $new_proj_comment);
23 }