| @@ -20,10 +20,8 @@ | ||
| 20 | 20 | } |
| 21 | 21 | preg_match_all("/{[^}]*}/" ,$str,$matches); |
| 22 | 22 | $matches = array_unique($matches[0]); |
| 23 | 23 | $flag =false; |
| 24 | -$page_setting = get_option( 'wppm-page-settings' ); | |
| 25 | -$view = $page_setting['task-url-page']; | |
| 26 | 24 | foreach($matches as $match){ |
| 27 | 25 | switch($match){ |
| 28 | 26 | // Task ID |
| 29 | 27 | case '{task_id}': |
| @@ -92,9 +90,9 @@ | ||
| 92 | 90 | $str = preg_replace('/{last_comment_user_name}/', $this->get_last_comment_user_name($task_id), $str); |
| 93 | 91 | break; |
| 94 | 92 | //Project status |
| 95 | 93 | case '{project_status}'; |
| 96 | - $str = preg_replace('/{project_status}/', $this->get_new_project_status_name(sanitize_text_field($wppm_project_data['status'])), $str); | |
| 94 | + $str = preg_replace('/{project_status}/', $this->get_new_project_status_name((sanitize_text_field($wppm_project_data['status'])), $str)); | |
| 97 | 95 | break; |
| 98 | 96 | // Project Category |
| 99 | 97 | case '{project_category}'; |
| 100 | 98 | if(!empty($wppm_project_data['cat_id'])){ |
| @@ -127,12 +125,8 @@ | ||
| 127 | 125 | //Last comment body |
| 128 | 126 | case '{comment_body}': |
| 129 | 127 | $flag= true; |
| 130 | 128 | $str = preg_replace('/{comment_body}/', $this->get_last_comment_body($task_id), $str); |
| 131 | - break; | |
| 132 | - case '{task_url}': | |
| 133 | - $task_url = '<a class="wppm_link" href="' . $this->get_task_url($task_id,$view) . '" target="_blank">' . $this->get_task_url($task_id,$view) . '</a>'; | |
| 134 | - $str = preg_replace('/{task_url}/', $task_url, $str); | |
| 135 | 129 | break; |
| 136 | 130 | |
| 137 | 131 | } |
| 138 | 132 | } |