PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 6.0.7
Taskbuilder – Project Management & Task Management Tool With Kanban Board v6.0.7
6.0.7 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 All 59 releases
← All changes | includes/admin/projects/projects_list.php +5 -1 6.0.6 → 6.0.7 View file →
@@ -30,8 +30,10 @@
30 30 );
31 31 $wppm_date_setting = get_option('wppm_date_setting');
32 32 $wppm_deafault_time_duration_project = get_option('wppm_display_time_duration_project');
33 33 $wppm_current_user_capability = get_user_meta( $current_user->ID, 'wppm_capability', true );
34 +$wppm_can_create_project = ($current_user->has_cap('manage_options')) || $wppm_current_user_capability == 'wppm_manager'|| $wppm_current_user_capability == 'wppm_admin';
35 +$wppm_can_create_project = apply_filters( 'wppm_can_create_project', $wppm_can_create_project, $current_user->ID );
34 36 $proj_per_page = 20;
35 37 $page_no = (isset($_POST['page_no'])) ? intval(sanitize_text_field($_POST['page_no'])): '0';
36 38 $page = isset($_POST['page']) ? sanitize_text_field(wp_unslash($_POST['page'])):"";
37 39 $search_tag = isset($_POST['project_search']) ? sanitize_text_field($_POST['project_search']) : '';
@@ -281,9 +283,9 @@
281 283 <div class="col-sm-12" id="wppm_heading_inline">
282 284 <span class="wppm-heading-inline">
283 285 <?php echo !empty($is_archieved) ? esc_html__('Archived Projects', 'taskbuilder') : esc_html__('Projects', 'taskbuilder'); ?>
284 286 </span>
285 - <?php if($current_user->has_cap('manage_options') || $wppm_current_user_capability == 'wppm_manager'|| $wppm_current_user_capability == 'wppm_admin'){ ?>
287 + <?php if($wppm_can_create_project){ ?>
286 288 <span class="wppm-add-new-btn btn-primary" id="wppm_add_new_project_btn" onclick="wppm_add_new_project()" style="background-color:<?php echo esc_attr($appearance_settings['list-header-button-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-button-text-color'])?>;"><span style="margin-right:5px;"><img id="wppm_add_new_project_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/plus_icon.svg'); ?>" alt="plus_icon"></span><span><?php echo esc_html_e('Add New','taskbuilder');?></span></span>
287 289 <?php } ?>
288 290 <span class="wppm-add-new-btn btn-primary" id="wppm_project_list" onclick="wppm_get_project_list()" style="background-color:<?php echo esc_attr($appearance_settings['list-header-button-background-color'])?>;color:<?php echo esc_attr($appearance_settings['list-header-button-text-color'])?>;"><span style="margin-right:5px;"><img id ="wppm_project_list_icon" src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/list-symbol.svg'); ?>" alt="list-symbol"></span><span><?php echo esc_html_e('Project List','taskbuilder');?></span></span>
289 291 <?php if($current_user->has_cap('manage_options') || $wppm_current_user_capability == 'wppm_manager'|| $wppm_current_user_capability == 'wppm_admin' ){ ?>
@@ -446,8 +448,9 @@
446 448 </th>
447 449 <?php }?>
448 450 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"><span style="color:<?php echo esc_attr($appearance_settings['list-header-text-color'])?>"><?php echo esc_html_e('No. of tasks','taskbuilder'); ?></span></th>
449 451 <th class="wppm_table_header" style="background-color:<?php echo esc_attr($appearance_settings['list-header-background-color'])?>"></th>
452 + <?php do_action('wppm_project_list_extra_column_header'); ?>
450 453 </tr>
451 454 <tbody>
452 455 <?php
453 456 $total_projects=0;
@@ -631,8 +634,9 @@
631 634 <?php $style = (($current_user->ID && $current_user->has_cap('manage_options')) || ($wppmfunction->has_project_permission('delete_project',esc_attr($project->id))) || $wppm_current_user_capability == 'wppm_admin' || ($proejctdata['created_by']==$current_user->ID && $wppm_current_user_capability == 'wppm_manager') )? "display:inline":"display:none"; ?>
632 635 <span style="<?php echo esc_attr($style); ?>" onclick="wppm_delete_project(<?php echo esc_attr($project->id) ?>)"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/trash.svg'); ?>" alt="delete"></span>
633 636 <?php ?>
634 637 </td>
638 + <?php do_action('wppm_project_list_extra_column_cell', $project); ?>
635 639 </tr>
636 640 <?php
637 641 }
638 642 }