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
← All changes | includes/admin/projects/open_project/wppm_edit_project_thread.php +88 -88 6.0.46.0.6 View file →
@@ -1,89 +1,89 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit; // Exit if accessed directly
4 -}
5 -
6 -global $wpdb,$wppmfunction,$current_user;
7 -$comment_id = isset($_POST['comment_id']) ? absint(sanitize_text_field(wp_unslash($_POST['comment_id']))) : '' ;
8 -$proj_id = isset($_POST['proj_id']) ? absint(sanitize_text_field(wp_unslash($_POST['proj_id']))) : '' ;
9 -$project_data = $wppmfunction->get_project($proj_id);
10 -$project_comment = $wppmfunction->get_proj_comment($comment_id);
11 -$wppm_rich_text_editor = get_option('wppm_rich_text_editor');
12 -$wppm_toolbar_actions = get_option('wppm_toolbar_actions');
13 -$settings = get_option("wppm-ap-modal");
14 -if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_proj_comment_permission('edit_proj_comment',$proj_id,$comment_id) || ($current_user->ID && $current_user->has_cap('wppm_admin')))) {exit;}
15 -ob_start();
16 -?>
17 -<form id="frm_edit_proj_thread" method="post">
18 - <div>
19 - <textarea id="wppm_edit_proj_thread_editor">
20 - <?php echo !empty($project_comment['body']) ? wp_kses_post(wpautop($project_comment['body'])) : ''; ?>
21 - </textarea>
22 - </div>
23 - <input type="hidden" name="action" value="wppm_set_edit_proj_thread" />
24 - <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_proj_thread' ) ); ?>">
25 - <input type="hidden" id="wppm_proj_id" name="proj_id" value="<?php echo (esc_attr($proj_id)) ?>" />
26 - <input type="hidden" id="wppm_proj_comment_id" name="proj_comment_id" value="<?php echo (esc_attr($comment_id)) ?>" />
27 -</form>
28 -<script>
29 -jQuery( document ).ready( function( jQuery ) { <?php
30 - if((!empty($wppm_rich_text_editor)) && ($wppm_rich_text_editor == 1)){
31 - $bold = (isset($wppm_toolbar_actions['bold']) && $wppm_toolbar_actions['bold']==1)? 'bold' :"";
32 - $italic = (isset($wppm_toolbar_actions['italic']) && $wppm_toolbar_actions['italic']==1)? 'italic' :"";
33 - $underline = (isset($wppm_toolbar_actions['underline']) && $wppm_toolbar_actions['underline']==1)?'underline' :"";
34 - $blockquote = (isset($wppm_toolbar_actions['blockquote']) && $wppm_toolbar_actions['blockquote']==1)? 'blockquote' :"";
35 - $align = (isset($wppm_toolbar_actions['align']) && $wppm_toolbar_actions['align']==1)? ' alignleft aligncenter alignright ' :"";
36 - $bullist = (isset($wppm_toolbar_actions['bullist']) && $wppm_toolbar_actions['bullist']==1)? $bullist = 'bullist' :"";
37 - $numlist = (isset($wppm_toolbar_actions['numlist']) && $wppm_toolbar_actions['numlist']==1)? $numlist = 'numlist' :"";
38 - $rtl = (isset($wppm_toolbar_actions['rtl']) && $wppm_toolbar_actions['rtl']==1)? $rtl = 'rtl' :"";
39 - $link = (isset($wppm_toolbar_actions['link']) && $wppm_toolbar_actions['link']==1)? $link = 'link' :"";
40 - $image = (isset($wppm_toolbar_actions['wppm_insert_editor_img']) && $wppm_toolbar_actions['wppm_insert_editor_img']==1)? $image = 'image' :"";
41 - $forecolor = (isset($wppm_toolbar_actions['forecolor']) && $wppm_toolbar_actions['forecolor']==1)? $forecolor = 'forecolor' :"";
42 - $backcolor = (isset($wppm_toolbar_actions['backcolor']) && $wppm_toolbar_actions['backcolor']==1)? $backcolor = 'backcolor' :"";
43 - $strikethrough = (isset($wppm_toolbar_actions['strikethrough']) && $wppm_toolbar_actions['strikethrough']==1)? $strikethrough = 'strikethrough' :"";
44 - $toolbar = trim("$bold $italic $underline $blockquote | $align | $bullist $numlist | $rtl | $link $image | $forecolor $backcolor $strikethrough");?>
45 - tinymce.remove();
46 - tinymce.init({
47 - selector:'#wppm_edit_proj_thread_editor',
48 - body_id: 'wppm_edit_proj_thread_editor',
49 - directionality : '<?php //echo 'rtl'; ?>',
50 - menubar: false,
51 - statusbar: false,
52 - height : '200',
53 - width : '100%',
54 - plugins: [
55 - 'lists link image directionality'
56 - ],
57 - image_advtab: true,
58 - toolbar: '<?php echo esc_js( $toolbar ); ?>',
59 - branding: false,
60 - autoresize_bottom_margin: 20,
61 - browser_spellcheck : true,
62 - relative_urls : false,
63 - remove_script_host : false,
64 - convert_urls : true,
65 - content_style:
66 - `body {
67 - color:<?php echo esc_attr( $settings['body-text-color'])?>!important;
68 - }`,
69 - setup: function (editor) {
70 - }
71 - });
72 - <?php } ?>
73 - });
74 -<?php
75 -$body = ob_get_clean();
76 -
77 -ob_start();
78 -?>
79 -<button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button>
80 -<button type="button" class="btn wppm_popup_action" onclick="wppm_set_edit_proj_thread(<?php echo esc_attr($proj_id) ?>);"><?php echo esc_html_e('Save','taskbuilder');?></button>
81 -<?php
82 -$footer = ob_get_clean();
83 -
84 -$output = array(
85 - 'body' => $body,
86 - 'footer' => $footer
87 -);
88 -
1 +<?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + exit; // Exit if accessed directly
4 +}
5 +
6 +global $wpdb,$wppmfunction,$current_user;
7 +$comment_id = isset($_POST['comment_id']) ? absint(sanitize_text_field(wp_unslash($_POST['comment_id']))) : '' ;
8 +$proj_id = isset($_POST['proj_id']) ? absint(sanitize_text_field(wp_unslash($_POST['proj_id']))) : '' ;
9 +$project_data = $wppmfunction->get_project($proj_id);
10 +$project_comment = $wppmfunction->get_proj_comment($comment_id);
11 +$wppm_rich_text_editor = get_option('wppm_rich_text_editor');
12 +$wppm_toolbar_actions = get_option('wppm_toolbar_actions');
13 +$settings = get_option("wppm-ap-modal");
14 +if (!(($current_user->ID && $current_user->has_cap('manage_options')) || $wppmfunction->has_proj_comment_permission('edit_proj_comment',$proj_id,$comment_id) || ($current_user->ID && $current_user->has_cap('wppm_admin')))) {exit;}
15 +ob_start();
16 +?>
17 +<form id="frm_edit_proj_thread" method="post">
18 + <div>
19 + <textarea id="wppm_edit_proj_thread_editor">
20 + <?php echo !empty($project_comment['body']) ? wp_kses_post(wpautop($project_comment['body'])) : ''; ?>
21 + </textarea>
22 + </div>
23 + <input type="hidden" name="action" value="wppm_set_edit_proj_thread" />
24 + <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_proj_thread' ) ); ?>">
25 + <input type="hidden" id="wppm_proj_id" name="proj_id" value="<?php echo (esc_attr($proj_id)) ?>" />
26 + <input type="hidden" id="wppm_proj_comment_id" name="proj_comment_id" value="<?php echo (esc_attr($comment_id)) ?>" />
27 +</form>
28 +<script>
29 +jQuery( document ).ready( function( jQuery ) { <?php
30 + if((!empty($wppm_rich_text_editor)) && ($wppm_rich_text_editor == 1)){
31 + $bold = (isset($wppm_toolbar_actions['bold']) && $wppm_toolbar_actions['bold']==1)? 'bold' :"";
32 + $italic = (isset($wppm_toolbar_actions['italic']) && $wppm_toolbar_actions['italic']==1)? 'italic' :"";
33 + $underline = (isset($wppm_toolbar_actions['underline']) && $wppm_toolbar_actions['underline']==1)?'underline' :"";
34 + $blockquote = (isset($wppm_toolbar_actions['blockquote']) && $wppm_toolbar_actions['blockquote']==1)? 'blockquote' :"";
35 + $align = (isset($wppm_toolbar_actions['align']) && $wppm_toolbar_actions['align']==1)? ' alignleft aligncenter alignright ' :"";
36 + $bullist = (isset($wppm_toolbar_actions['bullist']) && $wppm_toolbar_actions['bullist']==1)? $bullist = 'bullist' :"";
37 + $numlist = (isset($wppm_toolbar_actions['numlist']) && $wppm_toolbar_actions['numlist']==1)? $numlist = 'numlist' :"";
38 + $rtl = (isset($wppm_toolbar_actions['rtl']) && $wppm_toolbar_actions['rtl']==1)? $rtl = 'rtl' :"";
39 + $link = (isset($wppm_toolbar_actions['link']) && $wppm_toolbar_actions['link']==1)? $link = 'link' :"";
40 + $image = (isset($wppm_toolbar_actions['wppm_insert_editor_img']) && $wppm_toolbar_actions['wppm_insert_editor_img']==1)? $image = 'image' :"";
41 + $forecolor = (isset($wppm_toolbar_actions['forecolor']) && $wppm_toolbar_actions['forecolor']==1)? $forecolor = 'forecolor' :"";
42 + $backcolor = (isset($wppm_toolbar_actions['backcolor']) && $wppm_toolbar_actions['backcolor']==1)? $backcolor = 'backcolor' :"";
43 + $strikethrough = (isset($wppm_toolbar_actions['strikethrough']) && $wppm_toolbar_actions['strikethrough']==1)? $strikethrough = 'strikethrough' :"";
44 + $toolbar = trim("$bold $italic $underline $blockquote | $align | $bullist $numlist | $rtl | $link $image | $forecolor $backcolor $strikethrough");?>
45 + tinymce.remove();
46 + tinymce.init({
47 + selector:'#wppm_edit_proj_thread_editor',
48 + body_id: 'wppm_edit_proj_thread_editor',
49 + directionality : '<?php //echo 'rtl'; ?>',
50 + menubar: false,
51 + statusbar: false,
52 + height : '200',
53 + width : '100%',
54 + plugins: [
55 + 'lists link image directionality'
56 + ],
57 + image_advtab: true,
58 + toolbar: '<?php echo esc_js( $toolbar ); ?>',
59 + branding: false,
60 + autoresize_bottom_margin: 20,
61 + browser_spellcheck : true,
62 + relative_urls : false,
63 + remove_script_host : false,
64 + convert_urls : true,
65 + content_style:
66 + `body {
67 + color:<?php echo esc_attr( $settings['body-text-color'])?>!important;
68 + }`,
69 + setup: function (editor) {
70 + }
71 + });
72 + <?php } ?>
73 + });
74 +<?php
75 +$body = ob_get_clean();
76 +
77 +ob_start();
78 +?>
79 +<button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button>
80 +<button type="button" class="btn wppm_popup_action" onclick="wppm_set_edit_proj_thread(<?php echo esc_attr($proj_id) ?>);"><?php echo esc_html_e('Save','taskbuilder');?></button>
81 +<?php
82 +$footer = ob_get_clean();
83 +
84 +$output = array(
85 + 'body' => $body,
86 + 'footer' => $footer
87 +);
88 +
89 89 echo wp_json_encode($output);