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/wppm_add_new_project.php +4 -2 6.0.3 → 6.0.7 View file →
@@ -12,9 +12,11 @@
12 12 $categories = $wpdb->get_results($sql);
13 13 $wppm_current_user_capability = get_user_meta( $current_user->ID, 'wppm_capability', true );
14 14 $wppm_rich_text_editor = get_option('wppm_rich_text_editor');
15 15 $wppm_toolbar_actions = get_option('wppm_toolbar_actions');
16 -if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options') || $current_user->ID && $current_user->has_cap('wppm_manager'))) {
16 +$wppm_can_create_project = ( $current_user->ID && $current_user->has_cap('wppm_admin') ) || $current_user->has_cap('manage_options') || ( $current_user->ID && $current_user->has_cap('wppm_manager') );
17 +$wppm_can_create_project = apply_filters( 'wppm_can_create_project', $wppm_can_create_project, $current_user->ID );
18 +if (!$wppm_can_create_project) {
17 19 exit;
18 20 }
19 21 ?>
20 22 <form class='wppm_add_new_project wppm_bootstrap' id="wppm_add_new_project" method="post">
@@ -22,9 +24,9 @@
22 24 <div class="col-sm-12">
23 25 <span class="wppm-heading-inline" style="margin-left:15px;">
24 26 <?php echo esc_html_e('Create Project','taskbuilder');?>
25 27 </span>
26 - <?php if($current_user->has_cap('manage_options') || $wppm_current_user_capability == 'wppm_manager'|| $wppm_current_user_capability == 'wppm_admin' ){ ?>
28 + <?php if($wppm_can_create_project){ ?>
27 29 <span class="wppm-add-new-btn btn-primary" id="wppm_add_new_proj" onclick="wppm_add_new_project()" ><span style="margin-right:5px;"></span><span><?php echo esc_html_e('+Create Project','taskbuilder');?></span></span>
28 30 <?php } ?>
29 31 <span class="wppm-add-new-btn btn-primary" id="wppm_project_list" onclick="wppm_get_project_list()" ><span style="margin-right:5px;"><img 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>
30 32 </div>