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 / settings / wppm_get_edit_priority.php

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

50 lines 2.4 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
6 global $current_user,$wpdb;
7 if (!($current_user->ID && $current_user->has_cap('manage_options'))) {exit;}
8
9 $priority_id = isset($_POST) && isset($_POST['priority_id']) ? intval(sanitize_text_field($_POST['priority_id'])) : 0;
10 if (!$priority_id) {exit;}
11
12 $priority = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}wppm_task_priorities WHERE id = $priority_id ");
13 ob_start();
14 ?>
15 <div class="form-group">
16 <label for="wppm_edit_priority_name"><?php echo esc_html_e('Priority Name','taskbuilder');?></label>
17 <p class="help-block"><?php echo esc_html_e('Insert priority name. Please make sure priority name you are entering should not already exist.','taskbuilder');?></p>
18 <input id="wppm_edit_priority_name" class="form-control" name="wppm_edit_priority_name" value="<?php echo esc_attr($priority->name)?>" />
19 </div>
20 <div class="form-group">
21 <label for="wppm_edit_priority_color"><?php echo esc_html_e('Color','taskbuilder');?></label>
22 <p class="help-block"><?php echo esc_html_e('Text color of priority.','taskbuilder');?></p>
23 <input id="wppm_edit_priority_color" class="wppm_edit_color_picker" name="wppm_edit_priority_color" value="<?php echo esc_attr($priority->color)?>" />
24 </div>
25 <div class="form-group">
26 <label for="wppm_edit_priority_bg_color"><?php echo esc_html_e('Background Color','taskbuilder');?></label>
27 <p class="help-block"><?php echo esc_html_e('Background color of priority.','taskbuilder');?></p>
28 <input id="wppm_edit_priority_bg_color" class="wppm_edit_color_picker" name="wppm_edit_priority_bg_color" value="<?php echo esc_attr($priority->bg_color)?>" />
29 </div>
30 <script>
31 jQuery(document).ready(function(){
32 jQuery('.wppm_edit_color_picker').wpColorPicker();
33 });
34 </script>
35 <?php
36 $body = ob_get_clean();
37 ob_start();
38 ?>
39 <button type="button" class="btn wppm_popup_close" onclick="wppm_modal_close();"><?php echo esc_html_e('Close','taskbuilder');?></button>
40 <button type="button" class="btn wppm_popup_action" onclick="wppm_set_edit_priority(<?php echo htmlentities(esc_attr($priority_id))?>);"><?php echo esc_html_e('Submit','taskbuilder');?></button>
41 <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_edit_priority' ) ); ?>">
42 <?php
43 $footer = ob_get_clean();
44
45 $output = array(
46 'body' => $body,
47 'footer' => $footer
48 );
49
50 echo json_encode($output);